diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index 8f03738786..25beb73a88 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4446,7 +4446,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4457,7 +4457,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -4467,7 +4466,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4492,6 +4490,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4589,7 +4611,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4663,14 +4685,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], - "description": "Create or update a 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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -4684,7 +4706,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4700,6 +4722,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -4793,7 +4834,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4892,7 +4933,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -4953,43 +4994,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/rowList" } } } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 412, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5016,31 +5056,151 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" }, "in": "path" } @@ -5051,15 +5211,31 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "x-example": null + "rowId": { + "type": "string", + "description": "Row 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.", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "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).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5068,43 +5244,42 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/row" } } } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 405, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5131,31 +5306,136 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -5166,21 +5446,205 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } } } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5206,7 +5670,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5281,7 +5745,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5396,7 +5860,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5470,7 +5934,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5522,7 +5986,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -5574,7 +6038,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5626,7 +6090,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5678,7 +6142,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5730,7 +6194,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5782,7 +6246,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5834,7 +6298,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -5886,7 +6350,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -5938,7 +6402,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -5990,7 +6454,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6073,7 +6537,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -6148,7 +6612,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6234,7 +6698,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6332,7 +6796,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6404,7 +6868,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6493,7 +6957,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6560,7 +7024,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6638,7 +7102,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -6866,7 +7330,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -6951,7 +7415,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7027,7 +7491,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7112,7 +7576,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7174,7 +7638,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7248,7 +7712,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7312,7 +7776,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7398,7 +7862,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7509,7 +7973,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7581,7 +8045,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7668,7 +8132,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7742,7 +8206,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7840,7 +8304,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -7901,7 +8365,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8070,13 +8534,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8100,7 +8588,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8124,7 +8612,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8148,7 +8636,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8172,7 +8660,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8196,7 +8684,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8220,7 +8708,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8244,7 +8732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8268,7 +8756,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8292,7 +8780,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8316,7 +8804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8340,7 +8828,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8364,7 +8852,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8388,7 +8876,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8406,6 +8894,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 85ef1334d4..223b655f72 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4542,7 +4542,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4615,7 +4615,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4674,11 +4674,11 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsage", "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4692,14 +4692,14 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsage", "group": null, - "weight": 121, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4720,7 +4720,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -4766,7 +4766,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4825,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4901,7 +4901,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +4962,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5024,7 +5024,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -5045,7 +5045,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5149,7 +5149,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5218,7 +5218,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5317,7 +5317,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5388,7 +5388,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5425,7 +5425,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5472,7 +5472,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5509,7 +5509,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5578,7 +5578,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5615,7 +5615,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5689,7 +5689,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5726,7 +5726,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5774,7 +5774,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5795,7 +5795,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5832,7 +5832,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5906,7 +5906,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5943,7 +5943,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6012,7 +6012,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6049,7 +6049,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6086,7 +6086,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6107,7 +6107,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6123,12 +6123,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6160,7 +6160,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6182,7 +6182,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -6238,7 +6238,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6275,7 +6275,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6301,7 +6301,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -6320,7 +6320,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6358,7 +6358,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6395,7 +6395,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6422,17 +6422,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -6474,7 +6474,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6511,7 +6511,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6542,23 +6542,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6595,7 +6595,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6632,7 +6632,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6659,17 +6659,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6711,7 +6711,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6748,7 +6748,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6779,23 +6779,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6832,7 +6832,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6869,7 +6869,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6896,7 +6896,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6938,7 +6938,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6975,7 +6975,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7006,13 +7006,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7049,7 +7049,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7086,7 +7086,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7103,7 +7103,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -7180,7 +7180,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7217,7 +7217,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7297,7 +7297,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7334,7 +7334,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7376,7 +7376,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7413,7 +7413,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7450,7 +7450,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7519,7 +7519,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7556,7 +7556,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7593,7 +7593,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7661,7 +7661,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7698,7 +7698,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7732,7 +7732,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7769,7 +7769,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7812,7 +7812,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7849,7 +7849,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7887,7 +7887,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7920,7 +7920,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8005,7 +8005,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8016,7 +8016,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -8026,7 +8025,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8074,7 +8072,7 @@ "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." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8154,9 +8152,9 @@ "tags": [ "databases" ], - "description": "Create or update 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", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -8170,7 +8168,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8185,6 +8183,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8246,7 +8262,7 @@ "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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate 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", @@ -8262,7 +8278,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8340,7 +8356,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8356,7 +8372,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8447,7 +8463,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8521,14 +8537,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], - "description": "Create or update a 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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8542,7 +8558,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8558,6 +8574,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -8651,7 +8686,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8750,7 +8785,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8834,7 +8869,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8927,7 +8962,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8939,8 +8974,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8951,8 +8984,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9004,7 +9036,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -9042,7 +9074,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9054,8 +9086,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9066,8 +9096,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9157,7 +9186,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9238,8 +9267,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9367,7 +9396,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9438,7 +9467,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9518,7 +9547,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9601,7 +9630,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9693,7 +9722,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9743,6 +9772,4763 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesListLogs", + "tags": [ + "tables" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listLogs", + "group": "tables", + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "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).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetUsage", + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageTable" + } + } + } + } + }, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -9766,7 +14552,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 122, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9802,7 +14588,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -9848,7 +14634,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9921,7 +14707,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -10154,7 +14940,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10203,7 +14989,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10253,7 +15039,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10353,7 +15139,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -10413,7 +15199,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -10485,7 +15271,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10544,7 +15330,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10774,7 +15560,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -10835,7 +15621,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10915,7 +15701,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -10998,7 +15784,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -11094,7 +15880,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -11179,7 +15965,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11282,7 +16068,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11379,7 +16165,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -11441,7 +16227,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -11505,7 +16291,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -11595,7 +16381,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11666,7 +16452,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11741,7 +16527,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11856,7 +16642,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11921,7 +16707,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -11992,7 +16778,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -12074,7 +16860,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12133,7 +16919,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -12224,7 +17010,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12293,7 +17079,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12384,7 +17170,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12455,7 +17241,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12507,7 +17293,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -12559,7 +17345,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12608,7 +17394,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12657,7 +17443,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12706,7 +17492,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12766,7 +17552,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12815,7 +17601,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12864,7 +17650,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -12926,7 +17712,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -12988,7 +17774,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13061,7 +17847,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13123,7 +17909,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13211,7 +17997,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13273,7 +18059,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13335,7 +18121,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13397,7 +18183,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13459,7 +18245,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13521,7 +18307,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13583,7 +18369,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13645,7 +18431,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13707,7 +18493,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13756,7 +18542,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13805,7 +18591,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13854,7 +18640,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13906,7 +18692,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -13958,7 +18744,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14010,7 +18796,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14062,7 +18848,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14114,7 +18900,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14166,7 +18952,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14218,7 +19004,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14270,7 +19056,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14346,7 +19132,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -14490,7 +19276,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14636,7 +19422,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -14810,7 +19596,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -14988,7 +19774,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -15097,7 +19883,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -15209,7 +19995,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15262,7 +20048,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +20110,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -15399,7 +20185,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15474,7 +20260,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15550,7 +20336,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +20441,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -15763,7 +20549,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -15848,7 +20634,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -15936,7 +20722,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -16051,7 +20837,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16169,7 +20955,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16264,7 +21050,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -16362,7 +21148,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16467,7 +21253,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16575,7 +21361,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16718,7 +21504,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -16863,7 +21649,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16958,7 +21744,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -17056,7 +21842,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -17151,7 +21937,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17249,7 +22035,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17344,7 +22130,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17442,7 +22228,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17537,7 +22323,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17635,7 +22421,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -17688,7 +22474,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -17750,7 +22536,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -17825,7 +22611,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17900,7 +22686,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -17974,7 +22760,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -18057,7 +22843,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18117,7 +22903,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18194,7 +22980,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18256,7 +23042,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -18331,7 +23117,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18415,7 +23201,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18505,7 +23291,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -18568,7 +23354,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18643,7 +23429,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -18717,7 +23503,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -18805,7 +23591,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -18898,7 +23684,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -18977,7 +23763,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -19053,7 +23839,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -19125,7 +23911,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19236,7 +24022,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19369,7 +24155,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19474,7 +24260,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19598,7 +24384,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -19656,7 +24442,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19707,7 +24493,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -19767,7 +24553,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -19855,7 +24641,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19901,7 +24687,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24765,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20037,7 +24823,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20117,7 +24903,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20177,7 +24963,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20249,7 +25035,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20383,7 +25169,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20441,7 +25227,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20556,7 +25342,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20616,7 +25402,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20708,7 +25494,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -20787,7 +25573,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -20866,7 +25652,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -20945,7 +25731,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21024,7 +25810,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21115,7 +25901,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21197,7 +25983,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21276,7 +26062,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21355,7 +26141,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21434,7 +26220,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21490,6 +26276,85 @@ } } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21513,7 +26378,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21613,7 +26478,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -21681,7 +26546,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -21766,7 +26631,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -21834,7 +26699,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -21920,7 +26785,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -21990,7 +26855,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22077,7 +26942,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22135,7 +27000,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22228,7 +27093,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22296,7 +27161,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22390,7 +27255,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22460,7 +27325,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22598,7 +27463,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22656,7 +27521,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -22775,7 +27640,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +27708,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -22938,7 +27803,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23008,7 +27873,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23109,7 +27974,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23188,7 +28053,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23306,7 +28171,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23437,7 +28302,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23516,7 +28381,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23740,7 +28605,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24004,7 +28869,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24230,7 +29095,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24451,7 +29316,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24691,7 +29556,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -24914,7 +29779,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -24972,7 +29837,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25087,7 +29952,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25155,7 +30020,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25271,7 +30136,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25341,7 +30206,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25411,7 +30276,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25485,7 +30350,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -25552,7 +30417,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -25630,7 +30495,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25743,7 +30608,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -25821,7 +30686,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -25872,7 +30737,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -25932,7 +30797,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -25992,7 +30857,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26062,7 +30927,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -26311,7 +31176,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -26360,7 +31225,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -26410,7 +31275,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -26510,7 +31375,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26570,7 +31435,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26642,7 +31507,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26701,7 +31566,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -26946,7 +31811,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -27007,7 +31872,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27087,7 +31952,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27170,7 +32035,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -27271,7 +32136,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -27351,7 +32216,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -27454,7 +32319,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27552,7 +32417,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27614,7 +32479,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27678,7 +32543,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -27768,7 +32633,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -27839,7 +32704,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -27910,7 +32775,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -27972,7 +32837,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -28043,7 +32908,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -28125,7 +32990,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28184,7 +33049,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28275,7 +33140,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28344,7 +33209,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28435,7 +33300,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28506,7 +33371,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28579,7 +33444,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28706,7 +33571,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -28765,7 +33630,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -28889,7 +33754,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -28950,7 +33815,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29036,7 +33901,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29134,7 +33999,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29206,7 +34071,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29295,7 +34160,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29362,7 +34227,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29440,7 +34305,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29668,7 +34533,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29753,7 +34618,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -29825,7 +34690,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -29907,7 +34772,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -29983,7 +34848,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30068,7 +34933,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30130,7 +34995,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30204,7 +35069,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30268,7 +35133,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30341,7 +35206,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30427,7 +35292,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30538,7 +35403,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30610,7 +35475,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30697,7 +35562,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30771,7 +35636,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -30868,7 +35733,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -30928,7 +35793,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31009,7 +35874,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31089,7 +35954,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -31178,7 +36043,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31238,7 +36103,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31308,7 +36173,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31370,7 +36235,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31443,7 +36308,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31531,7 +36396,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31616,7 +36481,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31701,7 +36566,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31769,7 +36634,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -31830,7 +36695,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -31915,7 +36780,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32000,7 +36865,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32115,7 +36980,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32218,7 +37083,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32323,7 +37188,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32395,7 +37260,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32447,7 +37312,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32508,7 +37373,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32588,7 +37453,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32670,7 +37535,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -32753,7 +37618,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -32827,7 +37692,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -32912,7 +37777,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -32985,7 +37850,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33061,7 +37926,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33122,7 +37987,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33181,7 +38046,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33240,7 +38105,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33301,7 +38166,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33381,7 +38246,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33461,7 +38326,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33541,7 +38406,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33600,7 +38465,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33680,7 +38545,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33739,7 +38604,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -33791,7 +38656,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -33845,7 +38710,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -33916,7 +38781,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -33996,7 +38861,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34069,7 +38934,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34179,7 +39044,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34249,7 +39114,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34338,7 +39203,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34410,7 +39275,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34492,7 +39357,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34572,7 +39437,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34652,7 +39517,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34748,7 +39613,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -34833,7 +39698,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -34918,7 +39783,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -34988,7 +39853,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35042,7 +39907,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", @@ -35058,7 +39923,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35112,6 +39977,17 @@ "default": "" }, "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" } ] } @@ -35132,7 +40008,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35221,7 +40097,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35295,7 +40171,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35346,7 +40222,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35493,13 +40369,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35517,13 +40417,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35547,7 +40471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35571,7 +40495,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35589,13 +40513,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35619,7 +40567,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35643,7 +40591,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35667,7 +40615,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35691,7 +40639,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35715,7 +40663,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35739,7 +40687,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35763,7 +40711,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35787,7 +40735,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35811,7 +40759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35835,7 +40783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35859,7 +40807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35883,7 +40831,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35907,7 +40855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35931,7 +40879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35955,7 +40903,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35979,7 +40927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36003,7 +40951,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36027,7 +40975,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36051,7 +40999,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36075,7 +41023,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36099,7 +41047,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36123,7 +41071,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36147,7 +41095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36171,7 +41119,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36195,7 +41143,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36219,7 +41167,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36243,7 +41191,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36267,7 +41215,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36291,7 +41239,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36315,7 +41263,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36339,7 +41287,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36363,7 +41311,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36387,7 +41335,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36411,7 +41359,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36435,7 +41383,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36459,7 +41407,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36483,7 +41431,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36507,7 +41455,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36531,7 +41479,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36555,7 +41503,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36579,7 +41527,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37532,6 +42480,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37604,6 +43449,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40500,6 +46474,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40721,6 +46700,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -40793,7 +46773,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41512,12 +47495,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41552,6 +47547,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41560,6 +47563,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41589,13 +47600,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41616,12 +47631,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41648,6 +47675,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41656,6 +47691,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41684,17 +47727,51 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -42813,6 +48890,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43019,6 +49102,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 3e9b87fdf1..03ff69d4f9 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4060,7 +4060,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4134,7 +4134,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4214,7 +4214,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4274,7 +4274,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4351,7 +4351,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4413,7 +4413,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4476,7 +4476,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -4497,7 +4497,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4602,7 +4602,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4672,7 +4672,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4772,7 +4772,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4844,7 +4844,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -4882,7 +4882,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -4967,7 +4967,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5036,7 +5036,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5074,7 +5074,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5148,7 +5148,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5186,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5234,7 +5234,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5255,7 +5255,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5293,7 +5293,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5367,7 +5367,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5405,7 +5405,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5474,7 +5474,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5512,7 +5512,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5549,7 +5549,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5570,7 +5570,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5586,12 +5586,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5624,7 +5624,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5646,7 +5646,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -5702,7 +5702,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5740,7 +5740,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5766,7 +5766,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -5785,7 +5785,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5823,7 +5823,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5861,7 +5861,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5888,17 +5888,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -5940,7 +5940,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -5978,7 +5978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6009,23 +6009,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6062,7 +6062,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6100,7 +6100,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6127,17 +6127,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6179,7 +6179,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6217,7 +6217,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6248,23 +6248,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6301,7 +6301,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6339,7 +6339,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6366,7 +6366,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6408,7 +6408,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6446,7 +6446,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6477,13 +6477,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6520,7 +6520,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6558,7 +6558,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6575,7 +6575,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -6652,7 +6652,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6690,7 +6690,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6770,7 +6770,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6808,7 +6808,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6850,7 +6850,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6887,7 +6887,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6925,7 +6925,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6994,7 +6994,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7032,7 +7032,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7069,7 +7069,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7137,7 +7137,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7175,7 +7175,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7209,7 +7209,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7247,7 +7247,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7290,7 +7290,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7328,7 +7328,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7366,7 +7366,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7399,7 +7399,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7486,7 +7486,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7497,7 +7497,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -7507,7 +7506,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7555,7 +7553,7 @@ "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." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7637,9 +7635,9 @@ "tags": [ "databases" ], - "description": "Create or update 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", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -7653,7 +7651,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7668,6 +7666,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Key": [] @@ -7730,7 +7746,7 @@ "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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate 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", @@ -7746,7 +7762,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7825,7 +7841,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -7841,7 +7857,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -7933,7 +7949,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8009,14 +8025,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], - "description": "Create or update a 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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8030,7 +8046,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8046,6 +8062,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [], "Session": [] @@ -8141,7 +8176,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8242,7 +8277,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8328,7 +8363,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8340,8 +8375,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8353,9 +8386,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8407,7 +8438,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -8445,7 +8476,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8457,8 +8488,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8470,9 +8499,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8562,7 +8589,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8644,8 +8671,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8774,7 +8801,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8846,7 +8873,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8904,6 +8931,4544 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "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).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8927,7 +13492,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9001,7 +13566,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -9235,7 +13800,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9285,7 +13850,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9336,7 +13901,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9396,7 +13961,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9627,7 +14192,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9689,7 +14254,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -9770,7 +14335,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9854,7 +14419,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -9951,7 +14516,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -10037,7 +14602,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10141,7 +14706,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10239,7 +14804,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -10302,7 +14867,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -10367,7 +14932,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -10458,7 +15023,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10530,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10607,7 +15172,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10724,7 +15289,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10791,7 +15356,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10863,7 +15428,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -10923,7 +15488,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -11015,7 +15580,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11085,7 +15650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -11177,7 +15742,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11249,7 +15814,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11303,7 +15868,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -11357,7 +15922,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11407,7 +15972,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11457,7 +16022,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11507,7 +16072,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11568,7 +16133,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11618,7 +16183,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11668,7 +16233,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11731,7 +16296,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11794,7 +16359,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11868,7 +16433,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -11931,7 +16496,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12020,7 +16585,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12083,7 +16648,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12146,7 +16711,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12209,7 +16774,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12272,7 +16837,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12335,7 +16900,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12398,7 +16963,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12461,7 +17026,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12524,7 +17089,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12574,7 +17139,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12624,7 +17189,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12674,7 +17239,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12728,7 +17293,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12782,7 +17347,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12836,7 +17401,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12890,7 +17455,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -12944,7 +17509,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -12998,7 +17563,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13052,7 +17617,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13106,7 +17671,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13183,7 +17748,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -13328,7 +17893,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -13475,7 +18040,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +18215,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -13829,7 +18394,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -13939,7 +18504,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14052,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14106,7 +18671,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -14169,7 +18734,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14245,7 +18810,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14321,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14398,7 +18963,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14504,7 +19069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14613,7 +19178,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -14699,7 +19264,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -14788,7 +19353,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -14904,7 +19469,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -15023,7 +19588,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15119,7 +19684,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15218,7 +19783,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +19889,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15433,7 +19998,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15577,7 +20142,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15723,7 +20288,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -15819,7 +20384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -15918,7 +20483,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16014,7 +20579,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -16113,7 +20678,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16209,7 +20774,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16308,7 +20873,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16404,7 +20969,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16503,7 +21068,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16557,7 +21122,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -16620,7 +21185,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -16696,7 +21261,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -16772,7 +21337,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -16847,7 +21412,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -16931,7 +21496,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -16992,7 +21557,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -17070,7 +21635,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17133,7 +21698,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17209,7 +21774,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17294,7 +21859,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17386,7 +21951,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17450,7 +22015,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17527,7 +22092,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -17598,7 +22163,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -17848,7 +22413,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -17898,7 +22463,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -17949,7 +22514,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -18009,7 +22574,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -18255,7 +22820,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18317,7 +22882,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18398,7 +22963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -18482,7 +23047,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -18584,7 +23149,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -18665,7 +23230,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -18769,7 +23334,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -18868,7 +23433,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -18931,7 +23496,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -18996,7 +23561,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -19087,7 +23652,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -19159,7 +23724,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19231,7 +23796,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19294,7 +23859,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19366,7 +23931,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19426,7 +23991,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19518,7 +24083,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19588,7 +24153,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19680,7 +24245,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -19752,7 +24317,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -19826,7 +24391,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19954,7 +24519,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20014,7 +24579,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20139,7 +24704,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20201,7 +24766,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20289,7 +24854,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20389,7 +24954,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20463,7 +25028,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20554,7 +25119,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20623,7 +25188,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -20703,7 +25268,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -20933,7 +25498,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21020,7 +25585,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21098,7 +25663,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21185,7 +25750,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21249,7 +25814,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21325,7 +25890,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21391,7 +25956,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21479,7 +26044,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21592,7 +26157,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21666,7 +26231,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21755,7 +26320,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21831,7 +26396,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21930,7 +26495,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -21992,7 +26557,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22075,7 +26640,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22156,7 +26721,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +26811,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22307,7 +26872,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22378,7 +26943,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22441,7 +27006,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22515,7 +27080,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22604,7 +27169,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22690,7 +27255,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22776,7 +27341,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -22845,7 +27410,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -22907,7 +27472,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22993,7 +27558,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23079,7 +27644,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23195,7 +27760,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23299,7 +27864,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23405,7 +27970,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23458,7 +28023,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23520,7 +28085,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23601,7 +28166,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23684,7 +28249,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -23768,7 +28333,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -23843,7 +28408,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -23929,7 +28494,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24003,7 +28568,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24080,7 +28645,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24142,7 +28707,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24202,7 +28767,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24262,7 +28827,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24324,7 +28889,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24405,7 +28970,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24486,7 +29051,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24567,7 +29132,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24627,7 +29192,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -24708,7 +29273,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24768,7 +29333,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -24821,7 +29386,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -24876,7 +29441,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -24948,7 +29513,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25029,7 +29594,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25103,7 +29668,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25214,7 +29779,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25285,7 +29850,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25375,7 +29940,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25448,7 +30013,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25531,7 +30096,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25612,7 +30177,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25780,13 +30345,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25804,13 +30393,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25834,7 +30447,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25858,7 +30471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25876,13 +30489,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25906,7 +30543,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25930,7 +30567,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25954,7 +30591,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25978,7 +30615,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26002,7 +30639,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26026,7 +30663,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26050,7 +30687,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26074,7 +30711,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26098,7 +30735,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26122,7 +30759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26146,7 +30783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26170,7 +30807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26194,7 +30831,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26218,7 +30855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26242,7 +30879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26266,7 +30903,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26290,7 +30927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26314,7 +30951,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26338,7 +30975,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26362,7 +30999,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26386,7 +31023,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26410,7 +31047,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26434,7 +31071,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26458,7 +31095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26482,7 +31119,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26506,7 +31143,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26530,7 +31167,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27483,6 +32120,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27555,6 +33089,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index b9fcb4672d..25beb73a88 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4446,7 +4446,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4457,7 +4457,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -4467,7 +4466,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4492,6 +4490,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4589,7 +4611,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4663,14 +4685,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -4684,7 +4706,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4700,6 +4722,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -4793,7 +4834,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4892,7 +4933,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -4953,43 +4994,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/rowList" } } } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 412, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5016,31 +5056,151 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" }, "in": "path" } @@ -5051,15 +5211,31 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "x-example": null + "rowId": { + "type": "string", + "description": "Row 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.", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "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).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5068,43 +5244,42 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/row" } } } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 405, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5131,31 +5306,136 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -5166,21 +5446,205 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } } } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5206,7 +5670,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5281,7 +5745,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5396,7 +5860,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5470,7 +5934,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5522,7 +5986,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -5574,7 +6038,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5626,7 +6090,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5678,7 +6142,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5730,7 +6194,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5782,7 +6246,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5834,7 +6298,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -5886,7 +6350,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -5938,7 +6402,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -5990,7 +6454,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6073,7 +6537,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -6148,7 +6612,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6234,7 +6698,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6332,7 +6796,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6404,7 +6868,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6493,7 +6957,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6560,7 +7024,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6638,7 +7102,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -6866,7 +7330,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -6951,7 +7415,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7027,7 +7491,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7112,7 +7576,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7174,7 +7638,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7248,7 +7712,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7312,7 +7776,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7398,7 +7862,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7509,7 +7973,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7581,7 +8045,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7668,7 +8132,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7742,7 +8206,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7840,7 +8304,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -7901,7 +8365,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8070,13 +8534,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8100,7 +8588,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8124,7 +8612,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8148,7 +8636,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8172,7 +8660,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8196,7 +8684,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8220,7 +8708,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8244,7 +8732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8268,7 +8756,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8292,7 +8780,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8316,7 +8804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8340,7 +8828,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8364,7 +8852,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8388,7 +8876,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8406,6 +8894,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index a950dd37dd..223b655f72 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4542,7 +4542,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4615,7 +4615,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4674,11 +4674,11 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsage", "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4692,14 +4692,14 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsage", "group": null, - "weight": 121, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4720,7 +4720,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -4766,7 +4766,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4825,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4901,7 +4901,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +4962,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5024,7 +5024,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -5045,7 +5045,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5149,7 +5149,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5218,7 +5218,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5317,7 +5317,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5388,7 +5388,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5425,7 +5425,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5472,7 +5472,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5509,7 +5509,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5578,7 +5578,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5615,7 +5615,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5689,7 +5689,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5726,7 +5726,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5774,7 +5774,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5795,7 +5795,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5832,7 +5832,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5906,7 +5906,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5943,7 +5943,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6012,7 +6012,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6049,7 +6049,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6086,7 +6086,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6107,7 +6107,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6123,12 +6123,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6160,7 +6160,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6182,7 +6182,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -6238,7 +6238,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6275,7 +6275,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6301,7 +6301,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -6320,7 +6320,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6358,7 +6358,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6395,7 +6395,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6422,17 +6422,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -6474,7 +6474,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6511,7 +6511,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6542,23 +6542,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6595,7 +6595,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6632,7 +6632,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6659,17 +6659,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6711,7 +6711,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6748,7 +6748,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6779,23 +6779,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6832,7 +6832,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6869,7 +6869,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6896,7 +6896,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6938,7 +6938,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6975,7 +6975,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7006,13 +7006,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7049,7 +7049,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7086,7 +7086,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7103,7 +7103,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -7180,7 +7180,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7217,7 +7217,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7297,7 +7297,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7334,7 +7334,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7376,7 +7376,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7413,7 +7413,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7450,7 +7450,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7519,7 +7519,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7556,7 +7556,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7593,7 +7593,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7661,7 +7661,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7698,7 +7698,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7732,7 +7732,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7769,7 +7769,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7812,7 +7812,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7849,7 +7849,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7887,7 +7887,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7920,7 +7920,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8005,7 +8005,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8016,7 +8016,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -8026,7 +8025,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8156,7 +8154,7 @@ ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -8170,7 +8168,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8185,6 +8183,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8262,7 +8278,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8356,7 +8372,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8447,7 +8463,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8521,14 +8537,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8542,7 +8558,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8558,6 +8574,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -8651,7 +8686,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8750,7 +8785,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8834,7 +8869,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8927,7 +8962,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8939,8 +8974,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8951,8 +8984,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9004,7 +9036,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -9042,7 +9074,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9054,8 +9086,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9066,8 +9096,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9157,7 +9186,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9238,8 +9267,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9367,7 +9396,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9438,7 +9467,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9518,7 +9547,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9601,7 +9630,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9693,7 +9722,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9743,6 +9772,4763 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesListLogs", + "tags": [ + "tables" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listLogs", + "group": "tables", + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "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).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetUsage", + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageTable" + } + } + } + } + }, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -9766,7 +14552,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 122, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9802,7 +14588,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -9848,7 +14634,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9921,7 +14707,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -10154,7 +14940,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10203,7 +14989,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10253,7 +15039,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10353,7 +15139,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -10413,7 +15199,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -10485,7 +15271,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10544,7 +15330,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10774,7 +15560,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -10835,7 +15621,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10915,7 +15701,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -10998,7 +15784,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -11094,7 +15880,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -11179,7 +15965,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11282,7 +16068,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11379,7 +16165,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -11441,7 +16227,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -11505,7 +16291,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -11595,7 +16381,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11666,7 +16452,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11741,7 +16527,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11856,7 +16642,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11921,7 +16707,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -11992,7 +16778,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -12074,7 +16860,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12133,7 +16919,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -12224,7 +17010,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12293,7 +17079,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12384,7 +17170,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12455,7 +17241,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12507,7 +17293,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -12559,7 +17345,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12608,7 +17394,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12657,7 +17443,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12706,7 +17492,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12766,7 +17552,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12815,7 +17601,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12864,7 +17650,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -12926,7 +17712,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -12988,7 +17774,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13061,7 +17847,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13123,7 +17909,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13211,7 +17997,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13273,7 +18059,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13335,7 +18121,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13397,7 +18183,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13459,7 +18245,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13521,7 +18307,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13583,7 +18369,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13645,7 +18431,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13707,7 +18493,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13756,7 +18542,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13805,7 +18591,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13854,7 +18640,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13906,7 +18692,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -13958,7 +18744,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14010,7 +18796,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14062,7 +18848,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14114,7 +18900,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14166,7 +18952,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14218,7 +19004,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14270,7 +19056,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14346,7 +19132,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -14490,7 +19276,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14636,7 +19422,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -14810,7 +19596,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -14988,7 +19774,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -15097,7 +19883,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -15209,7 +19995,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15262,7 +20048,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +20110,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -15399,7 +20185,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15474,7 +20260,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15550,7 +20336,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +20441,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -15763,7 +20549,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -15848,7 +20634,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -15936,7 +20722,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -16051,7 +20837,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16169,7 +20955,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16264,7 +21050,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -16362,7 +21148,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16467,7 +21253,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16575,7 +21361,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16718,7 +21504,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -16863,7 +21649,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16958,7 +21744,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -17056,7 +21842,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -17151,7 +21937,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17249,7 +22035,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17344,7 +22130,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17442,7 +22228,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17537,7 +22323,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17635,7 +22421,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -17688,7 +22474,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -17750,7 +22536,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -17825,7 +22611,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17900,7 +22686,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -17974,7 +22760,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -18057,7 +22843,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18117,7 +22903,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18194,7 +22980,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18256,7 +23042,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -18331,7 +23117,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18415,7 +23201,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18505,7 +23291,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -18568,7 +23354,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18643,7 +23429,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -18717,7 +23503,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -18805,7 +23591,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -18898,7 +23684,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -18977,7 +23763,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -19053,7 +23839,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -19125,7 +23911,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19236,7 +24022,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19369,7 +24155,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19474,7 +24260,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19598,7 +24384,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -19656,7 +24442,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19707,7 +24493,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -19767,7 +24553,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -19855,7 +24641,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19901,7 +24687,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24765,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20037,7 +24823,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20117,7 +24903,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20177,7 +24963,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20249,7 +25035,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20383,7 +25169,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20441,7 +25227,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20556,7 +25342,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20616,7 +25402,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20708,7 +25494,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -20787,7 +25573,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -20866,7 +25652,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -20945,7 +25731,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21024,7 +25810,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21115,7 +25901,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21197,7 +25983,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21276,7 +26062,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21355,7 +26141,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21434,7 +26220,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21490,6 +26276,85 @@ } } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21513,7 +26378,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21613,7 +26478,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -21681,7 +26546,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -21766,7 +26631,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -21834,7 +26699,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -21920,7 +26785,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -21990,7 +26855,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22077,7 +26942,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22135,7 +27000,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22228,7 +27093,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22296,7 +27161,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22390,7 +27255,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22460,7 +27325,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22598,7 +27463,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22656,7 +27521,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -22775,7 +27640,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +27708,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -22938,7 +27803,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23008,7 +27873,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23109,7 +27974,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23188,7 +28053,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23306,7 +28171,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23437,7 +28302,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23516,7 +28381,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23740,7 +28605,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24004,7 +28869,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24230,7 +29095,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24451,7 +29316,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24691,7 +29556,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -24914,7 +29779,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -24972,7 +29837,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25087,7 +29952,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25155,7 +30020,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25271,7 +30136,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25341,7 +30206,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25411,7 +30276,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25485,7 +30350,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -25552,7 +30417,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -25630,7 +30495,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25743,7 +30608,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -25821,7 +30686,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -25872,7 +30737,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -25932,7 +30797,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -25992,7 +30857,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26062,7 +30927,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -26311,7 +31176,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -26360,7 +31225,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -26410,7 +31275,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -26510,7 +31375,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26570,7 +31435,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26642,7 +31507,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26701,7 +31566,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -26946,7 +31811,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -27007,7 +31872,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27087,7 +31952,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27170,7 +32035,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -27271,7 +32136,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -27351,7 +32216,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -27454,7 +32319,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27552,7 +32417,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27614,7 +32479,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27678,7 +32543,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -27768,7 +32633,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -27839,7 +32704,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -27910,7 +32775,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -27972,7 +32837,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -28043,7 +32908,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -28125,7 +32990,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28184,7 +33049,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28275,7 +33140,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28344,7 +33209,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28435,7 +33300,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28506,7 +33371,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28579,7 +33444,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28706,7 +33571,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -28765,7 +33630,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -28889,7 +33754,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -28950,7 +33815,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29036,7 +33901,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29134,7 +33999,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29206,7 +34071,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29295,7 +34160,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29362,7 +34227,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29440,7 +34305,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29668,7 +34533,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29753,7 +34618,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -29825,7 +34690,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -29907,7 +34772,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -29983,7 +34848,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30068,7 +34933,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30130,7 +34995,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30204,7 +35069,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30268,7 +35133,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30341,7 +35206,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30427,7 +35292,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30538,7 +35403,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30610,7 +35475,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30697,7 +35562,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30771,7 +35636,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -30868,7 +35733,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -30928,7 +35793,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31009,7 +35874,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31089,7 +35954,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -31178,7 +36043,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31238,7 +36103,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31308,7 +36173,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31370,7 +36235,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31443,7 +36308,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31531,7 +36396,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31616,7 +36481,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31701,7 +36566,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31769,7 +36634,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -31830,7 +36695,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -31915,7 +36780,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32000,7 +36865,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32115,7 +36980,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32218,7 +37083,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32323,7 +37188,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32395,7 +37260,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32447,7 +37312,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32508,7 +37373,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32588,7 +37453,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32670,7 +37535,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -32753,7 +37618,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -32827,7 +37692,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -32912,7 +37777,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -32985,7 +37850,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33061,7 +37926,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33122,7 +37987,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33181,7 +38046,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33240,7 +38105,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33301,7 +38166,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33381,7 +38246,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33461,7 +38326,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33541,7 +38406,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33600,7 +38465,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33680,7 +38545,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33739,7 +38604,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -33791,7 +38656,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -33845,7 +38710,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -33916,7 +38781,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -33996,7 +38861,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34069,7 +38934,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34179,7 +39044,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34249,7 +39114,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34338,7 +39203,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34410,7 +39275,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34492,7 +39357,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34572,7 +39437,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34652,7 +39517,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34748,7 +39613,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -34833,7 +39698,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -34918,7 +39783,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -34988,7 +39853,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35042,7 +39907,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", @@ -35058,7 +39923,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35143,7 +40008,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35232,7 +40097,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35306,7 +40171,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35357,7 +40222,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35504,13 +40369,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35528,13 +40417,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35558,7 +40471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35582,7 +40495,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35600,13 +40513,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35630,7 +40567,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35654,7 +40591,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35678,7 +40615,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35702,7 +40639,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35726,7 +40663,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35750,7 +40687,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35774,7 +40711,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35798,7 +40735,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35822,7 +40759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35846,7 +40783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35870,7 +40807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35894,7 +40831,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35918,7 +40855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35942,7 +40879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35966,7 +40903,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35990,7 +40927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36014,7 +40951,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36038,7 +40975,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36062,7 +40999,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36086,7 +41023,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36110,7 +41047,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36134,7 +41071,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36158,7 +41095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36182,7 +41119,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36206,7 +41143,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36230,7 +41167,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36254,7 +41191,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36278,7 +41215,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36302,7 +41239,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36326,7 +41263,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36350,7 +41287,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36374,7 +41311,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36398,7 +41335,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36422,7 +41359,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36446,7 +41383,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36470,7 +41407,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36494,7 +41431,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36518,7 +41455,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36542,7 +41479,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36566,7 +41503,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36590,7 +41527,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37543,6 +42480,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37615,6 +43449,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40511,6 +46474,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40732,6 +46700,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -40804,7 +46773,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41523,12 +47495,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41563,6 +47547,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41571,6 +47563,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41600,13 +47600,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41627,12 +47631,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41659,6 +47675,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41667,6 +47691,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41695,17 +47727,51 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -42824,6 +48890,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43030,6 +49102,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 8b570f6b48..03ff69d4f9 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4060,7 +4060,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4134,7 +4134,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4214,7 +4214,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4274,7 +4274,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4351,7 +4351,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4413,7 +4413,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4476,7 +4476,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -4497,7 +4497,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4602,7 +4602,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4672,7 +4672,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4772,7 +4772,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4844,7 +4844,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -4882,7 +4882,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -4967,7 +4967,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5036,7 +5036,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5074,7 +5074,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5148,7 +5148,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5186,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5234,7 +5234,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5255,7 +5255,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5293,7 +5293,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5367,7 +5367,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5405,7 +5405,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5474,7 +5474,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5512,7 +5512,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5549,7 +5549,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5570,7 +5570,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5586,12 +5586,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5624,7 +5624,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5646,7 +5646,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -5702,7 +5702,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5740,7 +5740,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5766,7 +5766,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -5785,7 +5785,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5823,7 +5823,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5861,7 +5861,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5888,17 +5888,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -5940,7 +5940,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -5978,7 +5978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6009,23 +6009,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6062,7 +6062,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6100,7 +6100,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6127,17 +6127,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6179,7 +6179,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6217,7 +6217,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6248,23 +6248,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6301,7 +6301,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6339,7 +6339,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6366,7 +6366,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6408,7 +6408,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6446,7 +6446,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6477,13 +6477,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6520,7 +6520,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6558,7 +6558,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6575,7 +6575,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -6652,7 +6652,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6690,7 +6690,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6770,7 +6770,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6808,7 +6808,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6850,7 +6850,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6887,7 +6887,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6925,7 +6925,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6994,7 +6994,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7032,7 +7032,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7069,7 +7069,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7137,7 +7137,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7175,7 +7175,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7209,7 +7209,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7247,7 +7247,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7290,7 +7290,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7328,7 +7328,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7366,7 +7366,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7399,7 +7399,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7486,7 +7486,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7497,7 +7497,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -7507,7 +7506,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7639,7 +7637,7 @@ ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -7653,7 +7651,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7668,6 +7666,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Key": [] @@ -7746,7 +7762,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7841,7 +7857,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -7933,7 +7949,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8009,14 +8025,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8030,7 +8046,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8046,6 +8062,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [], "Session": [] @@ -8141,7 +8176,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8242,7 +8277,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8328,7 +8363,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8340,8 +8375,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8353,9 +8386,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8407,7 +8438,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -8445,7 +8476,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8457,8 +8488,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8470,9 +8499,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8562,7 +8589,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8644,8 +8671,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8774,7 +8801,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8846,7 +8873,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8904,6 +8931,4544 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "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).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8927,7 +13492,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9001,7 +13566,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -9235,7 +13800,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9285,7 +13850,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9336,7 +13901,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9396,7 +13961,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9627,7 +14192,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9689,7 +14254,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -9770,7 +14335,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9854,7 +14419,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -9951,7 +14516,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -10037,7 +14602,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10141,7 +14706,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10239,7 +14804,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -10302,7 +14867,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -10367,7 +14932,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -10458,7 +15023,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10530,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10607,7 +15172,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10724,7 +15289,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10791,7 +15356,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10863,7 +15428,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -10923,7 +15488,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -11015,7 +15580,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11085,7 +15650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -11177,7 +15742,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11249,7 +15814,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11303,7 +15868,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -11357,7 +15922,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11407,7 +15972,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11457,7 +16022,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11507,7 +16072,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11568,7 +16133,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11618,7 +16183,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11668,7 +16233,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11731,7 +16296,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11794,7 +16359,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11868,7 +16433,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -11931,7 +16496,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12020,7 +16585,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12083,7 +16648,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12146,7 +16711,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12209,7 +16774,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12272,7 +16837,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12335,7 +16900,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12398,7 +16963,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12461,7 +17026,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12524,7 +17089,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12574,7 +17139,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12624,7 +17189,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12674,7 +17239,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12728,7 +17293,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12782,7 +17347,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12836,7 +17401,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12890,7 +17455,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -12944,7 +17509,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -12998,7 +17563,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13052,7 +17617,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13106,7 +17671,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13183,7 +17748,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -13328,7 +17893,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -13475,7 +18040,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +18215,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -13829,7 +18394,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -13939,7 +18504,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14052,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14106,7 +18671,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -14169,7 +18734,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14245,7 +18810,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14321,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14398,7 +18963,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14504,7 +19069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14613,7 +19178,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -14699,7 +19264,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -14788,7 +19353,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -14904,7 +19469,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -15023,7 +19588,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15119,7 +19684,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15218,7 +19783,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +19889,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15433,7 +19998,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15577,7 +20142,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15723,7 +20288,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -15819,7 +20384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -15918,7 +20483,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16014,7 +20579,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -16113,7 +20678,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16209,7 +20774,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16308,7 +20873,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16404,7 +20969,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16503,7 +21068,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16557,7 +21122,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -16620,7 +21185,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -16696,7 +21261,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -16772,7 +21337,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -16847,7 +21412,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -16931,7 +21496,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -16992,7 +21557,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -17070,7 +21635,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17133,7 +21698,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17209,7 +21774,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17294,7 +21859,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17386,7 +21951,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17450,7 +22015,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17527,7 +22092,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -17598,7 +22163,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -17848,7 +22413,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -17898,7 +22463,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -17949,7 +22514,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -18009,7 +22574,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -18255,7 +22820,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18317,7 +22882,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18398,7 +22963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -18482,7 +23047,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -18584,7 +23149,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -18665,7 +23230,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -18769,7 +23334,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -18868,7 +23433,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -18931,7 +23496,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -18996,7 +23561,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -19087,7 +23652,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -19159,7 +23724,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19231,7 +23796,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19294,7 +23859,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19366,7 +23931,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19426,7 +23991,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19518,7 +24083,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19588,7 +24153,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19680,7 +24245,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -19752,7 +24317,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -19826,7 +24391,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19954,7 +24519,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20014,7 +24579,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20139,7 +24704,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20201,7 +24766,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20289,7 +24854,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20389,7 +24954,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20463,7 +25028,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20554,7 +25119,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20623,7 +25188,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -20703,7 +25268,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -20933,7 +25498,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21020,7 +25585,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21098,7 +25663,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21185,7 +25750,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21249,7 +25814,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21325,7 +25890,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21391,7 +25956,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21479,7 +26044,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21592,7 +26157,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21666,7 +26231,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21755,7 +26320,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21831,7 +26396,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21930,7 +26495,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -21992,7 +26557,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22075,7 +26640,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22156,7 +26721,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +26811,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22307,7 +26872,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22378,7 +26943,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22441,7 +27006,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22515,7 +27080,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22604,7 +27169,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22690,7 +27255,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22776,7 +27341,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -22845,7 +27410,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -22907,7 +27472,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22993,7 +27558,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23079,7 +27644,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23195,7 +27760,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23299,7 +27864,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23405,7 +27970,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23458,7 +28023,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23520,7 +28085,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23601,7 +28166,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23684,7 +28249,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -23768,7 +28333,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -23843,7 +28408,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -23929,7 +28494,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24003,7 +28568,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24080,7 +28645,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24142,7 +28707,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24202,7 +28767,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24262,7 +28827,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24324,7 +28889,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24405,7 +28970,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24486,7 +29051,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24567,7 +29132,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24627,7 +29192,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -24708,7 +29273,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24768,7 +29333,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -24821,7 +29386,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -24876,7 +29441,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -24948,7 +29513,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25029,7 +29594,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25103,7 +29668,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25214,7 +29779,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25285,7 +29850,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25375,7 +29940,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25448,7 +30013,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25531,7 +30096,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25612,7 +30177,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25780,13 +30345,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25804,13 +30393,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25834,7 +30447,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25858,7 +30471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25876,13 +30489,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25906,7 +30543,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25930,7 +30567,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25954,7 +30591,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25978,7 +30615,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26002,7 +30639,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26026,7 +30663,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26050,7 +30687,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26074,7 +30711,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26098,7 +30735,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26122,7 +30759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26146,7 +30783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26170,7 +30807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26194,7 +30831,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26218,7 +30855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26242,7 +30879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26266,7 +30903,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26290,7 +30927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26314,7 +30951,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26338,7 +30975,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26362,7 +30999,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26386,7 +31023,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26410,7 +31047,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26434,7 +31071,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26458,7 +31095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26482,7 +31119,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26506,7 +31143,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26530,7 +31167,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27483,6 +32120,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27555,6 +33089,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 33fe1a93c9..c032d4e2ab 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -3451,7 +3451,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3576,7 +3575,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3707,7 +3705,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3770,7 +3767,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4257,7 +4253,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4340,7 +4335,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4431,7 +4425,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4510,7 +4503,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4522,7 +4515,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4592,7 +4584,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4603,9 +4595,7 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", - "server", "server" ], "packaging": false, @@ -4613,7 +4603,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4638,6 +4627,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4733,7 +4746,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4745,7 +4758,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4800,7 +4812,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -4811,9 +4823,9 @@ "tags": [ "databases" ], - "description": "Create or update a 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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -4823,7 +4835,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4835,10 +4847,28 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -4928,7 +4958,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4940,7 +4970,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5025,7 +5054,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -5037,7 +5066,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5080,44 +5108,40 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/rowList" } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 412, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", "server" ], @@ -5143,26 +5167,146 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", + "x-example": "", "in": "path" }, { @@ -5171,17 +5315,35 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "rowId": { + "type": "string", + "description": "Row 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": "", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "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).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5189,44 +5351,40 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/row" } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 405, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", "server" ], @@ -5252,26 +5410,127 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", "in": "path" }, { @@ -5280,22 +5539,198 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5321,7 +5756,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5333,7 +5768,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5395,7 +5829,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5407,7 +5841,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5512,7 +5945,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5524,7 +5957,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5584,7 +6016,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5596,8 +6028,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -5658,7 +6089,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -5670,8 +6101,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -5730,7 +6160,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5742,7 +6172,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5782,7 +6211,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5794,7 +6223,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5834,7 +6262,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5846,7 +6274,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5886,7 +6313,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5898,7 +6325,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5938,7 +6364,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5950,7 +6376,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5990,7 +6415,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -6002,7 +6427,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6042,7 +6466,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -6054,7 +6478,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6094,7 +6517,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -6106,7 +6529,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6148,7 +6570,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6161,8 +6583,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6233,7 +6654,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -6246,8 +6667,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6304,7 +6724,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6316,7 +6736,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6387,7 +6806,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6399,7 +6818,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6477,7 +6895,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6489,7 +6907,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6547,7 +6964,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6559,7 +6976,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6636,7 +7052,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6648,7 +7064,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6706,7 +7121,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6718,7 +7133,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6785,7 +7199,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -6797,7 +7211,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6992,7 +7405,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -7004,7 +7417,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7071,7 +7483,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7083,7 +7495,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7146,7 +7557,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7158,7 +7569,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7236,7 +7646,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7248,7 +7658,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7298,7 +7707,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7310,7 +7719,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7373,7 +7781,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7385,7 +7793,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7435,7 +7842,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7447,7 +7854,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7518,7 +7924,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7530,7 +7936,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7631,7 +8036,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7643,7 +8048,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7701,7 +8105,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7713,7 +8117,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7787,7 +8190,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7799,7 +8202,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7859,7 +8261,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7953,7 +8355,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -8014,7 +8416,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8147,13 +8549,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8178,7 +8605,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8203,7 +8630,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8228,7 +8655,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8253,7 +8680,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8278,7 +8705,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8303,7 +8730,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8328,7 +8755,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8353,7 +8780,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8378,7 +8805,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8403,7 +8830,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8428,7 +8855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8453,7 +8880,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8478,7 +8905,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8497,6 +8924,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index a11fd21b42..24dda66db4 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -3466,7 +3466,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3591,7 +3590,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3722,7 +3720,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3785,7 +3782,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4272,7 +4268,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4355,7 +4350,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4446,7 +4440,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4527,7 +4520,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4590,7 +4583,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4661,7 +4654,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4709,7 +4702,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4781,7 +4774,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4843,7 +4836,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsage", "consumes": [], "produces": [ "application\/json" @@ -4851,7 +4844,7 @@ "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4861,14 +4854,14 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsage", "group": null, - "weight": 121, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4889,7 +4882,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -4933,7 +4926,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4992,7 +4985,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -5070,7 +5063,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5122,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5179,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -5209,7 +5202,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5314,7 +5307,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5381,7 +5374,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5482,7 +5475,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5549,7 +5542,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5584,7 +5577,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5630,7 +5623,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5665,7 +5658,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5736,7 +5729,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5771,7 +5764,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5844,7 +5837,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5879,7 +5872,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5927,7 +5920,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5950,7 +5943,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5985,7 +5978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6058,7 +6051,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -6093,7 +6086,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6164,7 +6157,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6199,7 +6192,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6233,7 +6226,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6260,7 +6253,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6272,12 +6265,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6307,7 +6300,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6327,7 +6320,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -6388,7 +6381,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6423,7 +6416,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6444,7 +6437,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -6466,7 +6459,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6506,7 +6499,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6541,7 +6534,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6567,19 +6560,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6624,7 +6617,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6659,7 +6652,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6686,26 +6679,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6744,7 +6737,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6779,7 +6772,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6805,19 +6798,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6862,7 +6855,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6897,7 +6890,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6924,26 +6917,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6982,7 +6975,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -7017,7 +7010,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7043,7 +7036,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -7088,7 +7081,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7123,7 +7116,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7150,14 +7143,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7196,7 +7189,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7231,7 +7224,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7245,7 +7238,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -7329,7 +7322,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7364,7 +7357,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7448,7 +7441,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7483,7 +7476,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7523,7 +7516,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7562,7 +7555,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7597,7 +7590,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7668,7 +7661,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7703,7 +7696,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7737,7 +7730,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7805,7 +7798,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7840,7 +7833,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7874,7 +7867,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7909,7 +7902,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7950,7 +7943,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7985,7 +7978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -8019,7 +8012,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -8052,7 +8045,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8064,7 +8057,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8134,7 +8126,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8145,9 +8137,7 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", - "server", "server" ], "packaging": false, @@ -8155,7 +8145,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8203,7 +8192,7 @@ "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." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8287,9 +8276,9 @@ "tags": [ "databases" ], - "description": "Create or update 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", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -8299,7 +8288,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8314,6 +8303,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8376,7 +8383,7 @@ "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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate 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", @@ -8388,7 +8395,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8468,7 +8475,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8480,7 +8487,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8566,7 +8573,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8578,7 +8585,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8633,7 +8639,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8644,9 +8650,9 @@ "tags": [ "databases" ], - "description": "Create or update a 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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8656,7 +8662,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8668,10 +8674,28 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -8761,7 +8785,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8773,7 +8797,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8858,7 +8881,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8870,7 +8893,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8936,7 +8958,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -9024,7 +9046,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9036,8 +9058,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9048,8 +9068,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9092,7 +9111,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -9133,7 +9152,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9145,8 +9164,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9157,8 +9174,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9240,7 +9256,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9318,8 +9334,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9446,7 +9462,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9515,7 +9531,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9589,7 +9605,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9667,7 +9683,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9753,7 +9769,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9800,6 +9816,4650 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listLogs", + "group": "tables", + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "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).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "schema": { + "$ref": "#\/definitions\/usageTable" + } + } + }, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -9823,7 +14483,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 122, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9857,7 +14517,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -9901,7 +14561,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9973,7 +14633,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -10224,7 +14884,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10273,7 +14933,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10323,7 +14983,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10417,7 +15077,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -10475,7 +15135,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -10545,7 +15205,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10604,7 +15264,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10851,7 +15511,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -10912,7 +15572,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10989,7 +15649,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -11069,7 +15729,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -11161,7 +15821,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -11246,7 +15906,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11352,7 +16012,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11448,7 +16108,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -11510,7 +16170,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -11577,7 +16237,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -11588,7 +16248,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "functions.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -11663,7 +16322,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11730,7 +16389,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11742,7 +16401,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -11804,7 +16462,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11816,7 +16474,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -11921,7 +16578,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11933,7 +16590,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -11986,7 +16642,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -12053,7 +16709,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -12131,7 +16787,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12190,7 +16846,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -12280,7 +16936,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12347,7 +17003,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12439,7 +17095,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12508,7 +17164,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12520,8 +17176,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -12582,7 +17237,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -12594,8 +17249,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -12654,7 +17308,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12703,7 +17357,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12752,7 +17406,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12801,7 +17455,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12859,7 +17513,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12908,7 +17562,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12957,7 +17611,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -13017,7 +17671,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -13077,7 +17731,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13146,7 +17800,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13206,7 +17860,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13290,7 +17944,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13350,7 +18004,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13410,7 +18064,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13470,7 +18124,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13530,7 +18184,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13590,7 +18244,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +18304,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13710,7 +18364,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13770,7 +18424,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13819,7 +18473,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13868,7 +18522,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13917,7 +18571,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13929,7 +18583,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13969,7 +18622,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -13981,7 +18634,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14021,7 +18673,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14033,7 +18685,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14073,7 +18724,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14085,7 +18736,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14125,7 +18775,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14137,7 +18787,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14177,7 +18826,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14189,7 +18838,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14229,7 +18877,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14241,7 +18889,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14281,7 +18928,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14293,7 +18940,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14333,7 +18979,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14408,7 +19054,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -14566,7 +19212,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14721,7 +19367,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -14916,7 +19562,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -15110,7 +19756,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -15228,7 +19874,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -15342,7 +19988,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15397,7 +20043,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -15457,7 +20103,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -15529,7 +20175,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15601,7 +20247,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15676,7 +20322,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15791,7 +20437,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -15904,7 +20550,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -15995,7 +20641,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -16084,7 +20730,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -16211,7 +20857,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16336,7 +20982,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16439,7 +21085,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -16540,7 +21186,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16655,7 +21301,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16768,7 +21414,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16927,7 +21573,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -17083,7 +21729,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -17186,7 +21832,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -17287,7 +21933,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -17390,7 +22036,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17491,7 +22137,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17594,7 +22240,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17695,7 +22341,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17798,7 +22444,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17897,7 +22543,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -17952,7 +22598,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -18012,7 +22658,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -18084,7 +22730,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -18156,7 +22802,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -18229,7 +22875,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -18317,7 +22963,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18377,7 +23023,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18456,7 +23102,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18516,7 +23162,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -18588,7 +23234,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18669,7 +23315,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18682,8 +23328,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -18757,7 +23402,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -18820,7 +23465,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18833,8 +23478,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -18891,7 +23535,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -18964,7 +23608,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -19056,7 +23700,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -19144,7 +23788,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -19228,7 +23872,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -19306,7 +23950,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -19377,7 +24021,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19496,7 +24140,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19616,7 +24260,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19728,7 +24372,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19839,7 +24483,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -19897,7 +24541,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19950,7 +24594,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -20008,7 +24652,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -20090,7 +24734,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -20138,7 +24782,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -20219,7 +24863,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20277,7 +24921,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20360,7 +25004,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20418,7 +25062,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20489,7 +25133,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20636,7 +25280,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20694,7 +25338,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20819,7 +25463,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20879,7 +25523,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20971,7 +25615,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -21049,7 +25693,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -21127,7 +25771,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -21205,7 +25849,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21283,7 +25927,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21375,7 +26019,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21456,7 +26100,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21534,7 +26178,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21612,7 +26256,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21690,7 +26334,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21743,6 +26387,84 @@ ] } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21768,7 +26490,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21863,7 +26585,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -21933,7 +26655,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -22016,7 +26738,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -22082,7 +26804,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -22168,7 +26890,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -22236,7 +26958,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22321,7 +27043,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22379,7 +27101,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22471,7 +27193,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22537,7 +27259,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22632,7 +27354,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22700,7 +27422,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22838,7 +27560,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22896,7 +27618,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -23016,7 +27738,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -23082,7 +27804,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -23179,7 +27901,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23247,7 +27969,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23348,7 +28070,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23426,7 +28148,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23555,7 +28277,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23693,7 +28415,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23769,7 +28491,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23989,7 +28711,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24252,7 +28974,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24472,7 +29194,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24689,7 +29411,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24924,7 +29646,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -25141,7 +29863,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -25199,7 +29921,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25317,7 +30039,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25383,7 +30105,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25504,7 +30226,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25572,7 +30294,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25638,7 +30360,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25711,7 +30433,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -25781,7 +30503,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -25864,7 +30586,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25984,7 +30706,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -26065,7 +30787,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -26118,7 +30840,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -26178,7 +30900,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -26236,7 +30958,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26308,7 +31030,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -26575,7 +31297,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -26624,7 +31346,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -26674,7 +31396,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -26768,7 +31490,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26826,7 +31548,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26896,7 +31618,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26955,7 +31677,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -27217,7 +31939,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -27278,7 +32000,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27355,7 +32077,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27435,7 +32157,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -27535,7 +32257,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -27614,7 +32336,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -27720,7 +32442,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27817,7 +32539,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27879,7 +32601,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27946,7 +32668,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -27957,7 +32679,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "sites.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -28032,7 +32753,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -28099,7 +32820,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -28170,7 +32891,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -28234,7 +32955,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -28301,7 +33022,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -28379,7 +33100,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28438,7 +33159,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28528,7 +33249,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28595,7 +33316,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28687,7 +33408,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28754,7 +33475,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28826,7 +33547,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28963,7 +33684,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -29022,7 +33743,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -29155,7 +33876,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -29214,7 +33935,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29226,7 +33947,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29297,7 +34017,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29309,7 +34029,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29387,7 +34106,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29399,7 +34118,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29457,7 +34175,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29469,7 +34187,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29546,7 +34263,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29558,7 +34275,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29616,7 +34332,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29628,7 +34344,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29695,7 +34410,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29707,7 +34422,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29902,7 +34616,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29914,7 +34628,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -29981,7 +34694,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -30051,7 +34764,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -30129,7 +34842,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -30141,7 +34854,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30204,7 +34916,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30216,7 +34928,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30294,7 +35005,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30306,7 +35017,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30356,7 +35066,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30368,7 +35078,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30431,7 +35140,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30443,7 +35152,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30493,7 +35201,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30563,7 +35271,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30575,7 +35283,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30646,7 +35353,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30658,7 +35365,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30759,7 +35465,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30771,7 +35477,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30829,7 +35534,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30841,7 +35546,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30915,7 +35619,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30927,7 +35631,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -30987,7 +35690,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -31080,7 +35783,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -31140,7 +35843,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31218,7 +35921,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31298,7 +36001,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -31382,7 +36085,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31442,7 +36145,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31513,7 +36216,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31573,7 +36276,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31645,7 +36348,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31740,7 +36443,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31831,7 +36534,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31920,7 +36623,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31989,7 +36692,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -32050,7 +36753,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -32141,7 +36844,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32232,7 +36935,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32358,7 +37061,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32470,7 +37173,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32580,7 +37283,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32650,7 +37353,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32704,7 +37407,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32765,7 +37468,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32844,7 +37547,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32926,7 +37629,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -33006,7 +37709,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -33077,7 +37780,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -33159,7 +37862,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -33233,7 +37936,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33305,7 +38008,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33364,7 +38067,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33423,7 +38126,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33482,7 +38185,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33543,7 +38246,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33622,7 +38325,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33701,7 +38404,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33778,7 +38481,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33837,7 +38540,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33914,7 +38617,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33973,7 +38676,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -34027,7 +38730,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -34083,7 +38786,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -34152,7 +38855,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -34229,7 +38932,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34301,7 +39004,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34412,7 +39115,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34480,7 +39183,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34570,7 +39273,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34640,7 +39343,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34722,7 +39425,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34801,7 +39504,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34880,7 +39583,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34975,7 +39678,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -35056,7 +39759,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -35139,7 +39842,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -35205,7 +39908,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35259,7 +39962,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", @@ -35271,7 +39974,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35319,6 +40022,15 @@ "x-example": "", "default": "", "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" } ] } @@ -35345,7 +40057,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35429,7 +40141,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35500,7 +40212,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35553,7 +40265,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35665,13 +40377,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35690,13 +40427,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35721,7 +40483,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35746,7 +40508,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35765,13 +40527,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35796,7 +40583,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35821,7 +40608,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35846,7 +40633,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35871,7 +40658,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35896,7 +40683,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35921,7 +40708,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35946,7 +40733,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35971,7 +40758,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35996,7 +40783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36021,7 +40808,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36046,7 +40833,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36071,7 +40858,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36096,7 +40883,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36121,7 +40908,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36146,7 +40933,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36171,7 +40958,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36196,7 +40983,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36221,7 +41008,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36246,7 +41033,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36271,7 +41058,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36296,7 +41083,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36321,7 +41108,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36346,7 +41133,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36371,7 +41158,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36396,7 +41183,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36421,7 +41208,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36446,7 +41233,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36471,7 +41258,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36496,7 +41283,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36521,7 +41308,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36546,7 +41333,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36571,7 +41358,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36596,7 +41383,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36621,7 +41408,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36646,7 +41433,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36671,7 +41458,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36696,7 +41483,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36721,7 +41508,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36746,7 +41533,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36771,7 +41558,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36796,7 +41583,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37751,6 +42538,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37823,6 +43508,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40732,6 +46546,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40958,6 +46777,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -41030,7 +46850,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41749,12 +47572,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41791,6 +47626,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41800,6 +47644,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41832,13 +47685,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41859,12 +47716,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41892,6 +47761,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41901,6 +47779,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41932,17 +47819,52 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -43122,6 +49044,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43342,6 +49270,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 7c15f9e5ea..96f69b1465 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -3142,7 +3142,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3269,7 +3268,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3402,7 +3400,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3467,7 +3464,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3956,7 +3952,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4041,7 +4036,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4134,7 +4128,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4215,7 +4208,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4288,7 +4281,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4371,7 +4364,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4431,7 +4424,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4510,7 +4503,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4570,7 +4563,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4628,7 +4621,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -4651,7 +4644,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4757,7 +4750,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4818,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4927,7 +4920,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4995,7 +4988,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5031,7 +5024,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5077,7 +5070,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5113,7 +5106,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5184,7 +5177,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5220,7 +5213,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5293,7 +5286,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5329,7 +5322,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5377,7 +5370,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5400,7 +5393,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5436,7 +5429,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5509,7 +5502,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5545,7 +5538,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5616,7 +5609,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5652,7 +5645,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5686,7 +5679,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5713,7 +5706,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5725,12 +5718,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5761,7 +5754,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5781,7 +5774,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -5842,7 +5835,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5878,7 +5871,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5899,7 +5892,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -5921,7 +5914,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5961,7 +5954,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5997,7 +5990,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6023,19 +6016,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6080,7 +6073,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6116,7 +6109,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6143,26 +6136,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6201,7 +6194,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6237,7 +6230,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6263,19 +6256,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6320,7 +6313,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6356,7 +6349,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6383,26 +6376,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6441,7 +6434,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6477,7 +6470,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6503,7 +6496,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6548,7 +6541,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6584,7 +6577,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6611,14 +6604,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6657,7 +6650,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6693,7 +6686,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6707,7 +6700,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -6791,7 +6784,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6827,7 +6820,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6911,7 +6904,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6947,7 +6940,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6987,7 +6980,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7026,7 +7019,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7062,7 +7055,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7133,7 +7126,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7169,7 +7162,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7203,7 +7196,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7271,7 +7264,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7307,7 +7300,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7341,7 +7334,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7377,7 +7370,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7418,7 +7411,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7454,7 +7447,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7488,7 +7481,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7521,7 +7514,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7533,7 +7526,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7605,7 +7597,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7616,9 +7608,7 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", - "server", "server" ], "packaging": false, @@ -7626,7 +7616,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7674,7 +7663,7 @@ "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." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7760,9 +7749,9 @@ "tags": [ "databases" ], - "description": "Create or update 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", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -7772,7 +7761,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7787,6 +7776,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Key": [] @@ -7850,7 +7857,7 @@ "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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate 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", @@ -7862,7 +7869,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7943,7 +7950,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -7955,7 +7962,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8042,7 +8049,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8054,7 +8061,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8111,7 +8117,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8122,9 +8128,9 @@ "tags": [ "databases" ], - "description": "Create or update a 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.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8134,7 +8140,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8146,10 +8152,28 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [], "Session": [] @@ -8241,7 +8265,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8253,7 +8277,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8340,7 +8363,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8352,7 +8375,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8422,7 +8444,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8434,8 +8456,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8447,9 +8467,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8492,7 +8510,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -8533,7 +8551,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8545,8 +8563,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8558,9 +8574,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8642,7 +8656,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8721,8 +8735,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8850,7 +8864,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8920,7 +8934,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8972,6 +8986,4449 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "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).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8995,7 +13452,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9068,7 +13525,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -9320,7 +13777,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9370,7 +13827,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9421,7 +13878,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9481,7 +13938,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9729,7 +14186,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9791,7 +14248,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -9869,7 +14326,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9950,7 +14407,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -10043,7 +14500,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -10129,7 +14586,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10236,7 +14693,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10333,7 +14790,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -10396,7 +14853,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -10464,7 +14921,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -10475,7 +14932,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "functions.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -10551,7 +15007,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10619,7 +15075,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10631,7 +15087,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -10695,7 +15150,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10707,7 +15162,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -10814,7 +15268,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10826,7 +15280,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -10881,7 +15334,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10949,7 +15402,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -11009,7 +15462,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -11100,7 +15553,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11168,7 +15621,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -11261,7 +15714,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11331,7 +15784,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11343,8 +15796,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -11407,7 +15859,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -11419,8 +15871,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -11481,7 +15932,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11531,7 +15982,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11581,7 +16032,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11631,7 +16082,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11690,7 +16141,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11740,7 +16191,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11790,7 +16241,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11851,7 +16302,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11912,7 +16363,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11982,7 +16433,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -12043,7 +16494,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12128,7 +16579,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12189,7 +16640,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12250,7 +16701,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12311,7 +16762,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12372,7 +16823,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12433,7 +16884,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12494,7 +16945,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12555,7 +17006,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12616,7 +17067,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12666,7 +17117,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12716,7 +17167,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12766,7 +17217,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12778,7 +17229,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12820,7 +17270,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12832,7 +17282,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12874,7 +17323,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12886,7 +17335,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12928,7 +17376,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12940,7 +17388,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12982,7 +17429,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -12994,7 +17441,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13036,7 +17482,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -13048,7 +17494,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13090,7 +17535,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13102,7 +17547,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13144,7 +17588,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13156,7 +17600,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13198,7 +17641,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13274,7 +17717,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -13433,7 +17876,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -13589,7 +18032,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -13785,7 +18228,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -13980,7 +18423,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -14099,7 +18542,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14214,7 +18657,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14270,7 +18713,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -14331,7 +18774,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14404,7 +18847,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14477,7 +18920,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14553,7 +18996,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14669,7 +19112,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14783,7 +19226,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -14875,7 +19318,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -14965,7 +19408,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -15093,7 +19536,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -15219,7 +19662,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15323,7 +19766,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15425,7 +19868,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -15541,7 +19984,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +20098,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15815,7 +20258,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15972,7 +20415,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16076,7 +20519,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -16178,7 +20621,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16282,7 +20725,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -16384,7 +20827,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16488,7 +20931,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16590,7 +21033,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16694,7 +21137,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16794,7 +21237,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16850,7 +21293,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -16911,7 +21354,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -16984,7 +21427,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17057,7 +21500,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -17131,7 +21574,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -17220,7 +21663,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -17281,7 +21724,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -17361,7 +21804,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17422,7 +21865,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17495,7 +21938,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17577,7 +22020,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17590,8 +22033,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -17667,7 +22109,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17731,7 +22173,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17744,8 +22186,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -17804,7 +22245,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -17877,7 +22318,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -18145,7 +22586,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -18195,7 +22636,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -18246,7 +22687,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -18306,7 +22747,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -18569,7 +23010,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18631,7 +23072,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18709,7 +23150,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -18790,7 +23231,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -18891,7 +23332,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -18971,7 +23412,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -19078,7 +23519,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -19176,7 +23617,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -19239,7 +23680,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -19307,7 +23748,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -19318,7 +23759,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "sites.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -19394,7 +23834,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -19462,7 +23902,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19534,7 +23974,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19599,7 +24039,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19667,7 +24107,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19727,7 +24167,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19818,7 +24258,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19886,7 +24326,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24419,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -20047,7 +24487,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20120,7 +24560,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20258,7 +24698,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20318,7 +24758,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20452,7 +24892,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20512,7 +24952,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20524,7 +24964,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -20597,7 +25036,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20609,7 +25048,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -20689,7 +25127,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20701,7 +25139,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -20761,7 +25198,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20773,7 +25210,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -20852,7 +25288,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20864,7 +25300,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -20924,7 +25359,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -20936,7 +25371,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21005,7 +25439,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -21017,7 +25451,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21214,7 +25647,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21226,7 +25659,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21295,7 +25727,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21307,7 +25739,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21372,7 +25803,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21384,7 +25815,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21464,7 +25894,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21476,7 +25906,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21528,7 +25957,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21540,7 +25969,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21605,7 +26033,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21617,7 +26045,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21669,7 +26096,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21681,7 +26108,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21754,7 +26180,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21766,7 +26192,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21869,7 +26294,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21881,7 +26306,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -21941,7 +26365,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21953,7 +26377,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -22029,7 +26452,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22041,7 +26464,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -22103,7 +26525,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22198,7 +26620,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -22260,7 +26682,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22340,7 +26762,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22421,7 +26843,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -22506,7 +26928,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22567,7 +26989,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22639,7 +27061,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22700,7 +27122,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22773,7 +27195,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22869,7 +27291,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22961,7 +27383,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -23051,7 +27473,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -23121,7 +27543,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -23183,7 +27605,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -23275,7 +27697,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23367,7 +27789,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23494,7 +27916,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23607,7 +28029,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23718,7 +28140,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23773,7 +28195,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23835,7 +28257,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23915,7 +28337,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23998,7 +28420,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24079,7 +28501,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -24151,7 +28573,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -24234,7 +28656,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24309,7 +28731,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24382,7 +28804,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24442,7 +28864,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24502,7 +28924,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24562,7 +28984,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24624,7 +29046,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24704,7 +29126,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24784,7 +29206,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24862,7 +29284,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24922,7 +29344,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -25000,7 +29422,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -25060,7 +29482,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25115,7 +29537,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -25172,7 +29594,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25242,7 +29664,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25320,7 +29742,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25393,7 +29815,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25505,7 +29927,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25574,7 +29996,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25665,7 +30087,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25736,7 +30158,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25819,7 +30241,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25899,7 +30321,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -26031,13 +30453,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26056,13 +30503,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26087,7 +30559,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26112,7 +30584,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26131,13 +30603,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26162,7 +30659,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26187,7 +30684,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26212,7 +30709,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26237,7 +30734,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26262,7 +30759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26287,7 +30784,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26312,7 +30809,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26337,7 +30834,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26362,7 +30859,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26387,7 +30884,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26412,7 +30909,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26437,7 +30934,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26462,7 +30959,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26487,7 +30984,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26512,7 +31009,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26537,7 +31034,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26562,7 +31059,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26587,7 +31084,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26612,7 +31109,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26637,7 +31134,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26662,7 +31159,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26687,7 +31184,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26712,7 +31209,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26737,7 +31234,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26762,7 +31259,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26787,7 +31284,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26812,7 +31309,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27767,6 +32264,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27839,6 +33234,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 804136b303..c032d4e2ab 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4503,7 +4503,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4584,7 +4584,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4595,7 +4595,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server" ], @@ -4604,7 +4603,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4629,6 +4627,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4724,7 +4746,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4790,7 +4812,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -4803,7 +4825,7 @@ ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -4813,7 +4835,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4828,6 +4850,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -4917,7 +4958,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -5013,7 +5054,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -5067,44 +5108,40 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/rowList" } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 412, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", "server" ], @@ -5130,26 +5167,146 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", + "x-example": "", "in": "path" }, { @@ -5158,17 +5315,35 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "rowId": { + "type": "string", + "description": "Row 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": "", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "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).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5176,44 +5351,40 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/row" } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 405, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", "platforms": [ - "console", - "server", "client", "server" ], @@ -5239,26 +5410,127 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", "in": "path" }, { @@ -5267,22 +5539,198 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5308,7 +5756,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5381,7 +5829,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5497,7 +5945,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5568,7 +6016,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5641,7 +6089,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -5712,7 +6160,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5763,7 +6211,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5814,7 +6262,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5865,7 +6313,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5916,7 +6364,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5967,7 +6415,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -6018,7 +6466,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -6069,7 +6517,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -6122,7 +6570,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6206,7 +6654,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -6276,7 +6724,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6358,7 +6806,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6447,7 +6895,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6516,7 +6964,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6604,7 +7052,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6673,7 +7121,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6751,7 +7199,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -6957,7 +7405,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -7035,7 +7483,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7109,7 +7557,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7198,7 +7646,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7259,7 +7707,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7333,7 +7781,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7394,7 +7842,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7476,7 +7924,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7588,7 +8036,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7657,7 +8105,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7742,7 +8190,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7813,7 +8261,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7907,7 +8355,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -7968,7 +8416,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8101,13 +8549,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8132,7 +8605,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8157,7 +8630,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8182,7 +8655,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8207,7 +8680,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8232,7 +8705,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8257,7 +8730,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8282,7 +8755,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8307,7 +8780,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8332,7 +8805,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8357,7 +8830,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8382,7 +8855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8407,7 +8880,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8432,7 +8905,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8451,6 +8924,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 461337ebda..24dda66db4 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4520,7 +4520,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4583,7 +4583,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4654,7 +4654,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4702,7 +4702,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4774,7 +4774,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4836,7 +4836,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsage", "consumes": [], "produces": [ "application\/json" @@ -4844,7 +4844,7 @@ "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4854,14 +4854,14 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsage", "group": null, - "weight": 121, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4882,7 +4882,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -4926,7 +4926,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4985,7 +4985,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -5063,7 +5063,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -5122,7 +5122,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5179,7 +5179,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -5202,7 +5202,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5307,7 +5307,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5374,7 +5374,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5475,7 +5475,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5542,7 +5542,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5577,7 +5577,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5623,7 +5623,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5658,7 +5658,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5729,7 +5729,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5764,7 +5764,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5837,7 +5837,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5872,7 +5872,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5920,7 +5920,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5943,7 +5943,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5978,7 +5978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6051,7 +6051,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -6086,7 +6086,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6157,7 +6157,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6192,7 +6192,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6226,7 +6226,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6253,7 +6253,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6265,12 +6265,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6300,7 +6300,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6320,7 +6320,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -6381,7 +6381,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6416,7 +6416,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6437,7 +6437,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -6459,7 +6459,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6499,7 +6499,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6534,7 +6534,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6560,19 +6560,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6617,7 +6617,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6652,7 +6652,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6679,26 +6679,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6737,7 +6737,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6772,7 +6772,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6798,19 +6798,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6855,7 +6855,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6890,7 +6890,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6917,26 +6917,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6975,7 +6975,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -7010,7 +7010,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7036,7 +7036,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -7081,7 +7081,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7116,7 +7116,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7143,14 +7143,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7189,7 +7189,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7224,7 +7224,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7238,7 +7238,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -7322,7 +7322,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7357,7 +7357,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7441,7 +7441,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7476,7 +7476,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7516,7 +7516,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7555,7 +7555,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7590,7 +7590,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7661,7 +7661,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7696,7 +7696,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7730,7 +7730,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7798,7 +7798,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7833,7 +7833,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7867,7 +7867,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7902,7 +7902,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7943,7 +7943,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7978,7 +7978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -8012,7 +8012,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -8045,7 +8045,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8126,7 +8126,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8137,7 +8137,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server" ], @@ -8146,7 +8145,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8280,7 +8278,7 @@ ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -8290,7 +8288,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8305,6 +8303,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8379,7 +8395,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8471,7 +8487,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8557,7 +8573,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8623,7 +8639,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8636,7 +8652,7 @@ ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8646,7 +8662,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8661,6 +8677,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [] } @@ -8750,7 +8785,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8846,7 +8881,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8923,7 +8958,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -9011,7 +9046,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9023,8 +9058,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9035,8 +9068,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9079,7 +9111,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -9120,7 +9152,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9132,8 +9164,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9144,8 +9174,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9227,7 +9256,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9305,8 +9334,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9433,7 +9462,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9502,7 +9531,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9576,7 +9605,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9654,7 +9683,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9740,7 +9769,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9787,6 +9816,4650 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listLogs", + "group": "tables", + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "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).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "schema": { + "$ref": "#\/definitions\/usageTable" + } + } + }, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -9810,7 +14483,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 122, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9844,7 +14517,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -9888,7 +14561,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9960,7 +14633,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -10211,7 +14884,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10260,7 +14933,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10310,7 +14983,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10404,7 +15077,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -10462,7 +15135,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -10532,7 +15205,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10591,7 +15264,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10838,7 +15511,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -10899,7 +15572,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10976,7 +15649,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -11056,7 +15729,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -11148,7 +15821,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -11233,7 +15906,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11339,7 +16012,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11435,7 +16108,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -11497,7 +16170,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -11564,7 +16237,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -11649,7 +16322,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11716,7 +16389,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11789,7 +16462,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11905,7 +16578,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11969,7 +16642,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -12036,7 +16709,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -12114,7 +16787,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12173,7 +16846,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -12263,7 +16936,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12330,7 +17003,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12422,7 +17095,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12491,7 +17164,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12564,7 +17237,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -12635,7 +17308,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12684,7 +17357,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12733,7 +17406,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12782,7 +17455,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12840,7 +17513,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12889,7 +17562,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12938,7 +17611,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -12998,7 +17671,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -13058,7 +17731,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13127,7 +17800,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13187,7 +17860,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13271,7 +17944,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13331,7 +18004,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13391,7 +18064,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13451,7 +18124,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13511,7 +18184,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13571,7 +18244,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13631,7 +18304,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13691,7 +18364,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13751,7 +18424,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13800,7 +18473,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13849,7 +18522,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13898,7 +18571,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13949,7 +18622,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -14000,7 +18673,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14051,7 +18724,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14102,7 +18775,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14153,7 +18826,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14204,7 +18877,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14255,7 +18928,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14306,7 +18979,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14381,7 +19054,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -14539,7 +19212,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14694,7 +19367,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -14889,7 +19562,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -15083,7 +19756,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -15201,7 +19874,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -15315,7 +19988,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15370,7 +20043,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -15430,7 +20103,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -15502,7 +20175,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15574,7 +20247,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15649,7 +20322,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15764,7 +20437,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -15877,7 +20550,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -15968,7 +20641,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -16057,7 +20730,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -16184,7 +20857,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16309,7 +20982,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16412,7 +21085,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -16513,7 +21186,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16628,7 +21301,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16741,7 +21414,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16900,7 +21573,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -17056,7 +21729,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -17159,7 +21832,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -17260,7 +21933,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -17363,7 +22036,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17464,7 +22137,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17567,7 +22240,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17668,7 +22341,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17771,7 +22444,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17870,7 +22543,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -17925,7 +22598,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -17985,7 +22658,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -18057,7 +22730,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -18129,7 +22802,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -18202,7 +22875,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -18290,7 +22963,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18350,7 +23023,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18429,7 +23102,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18489,7 +23162,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -18561,7 +23234,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18642,7 +23315,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18729,7 +23402,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -18792,7 +23465,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18862,7 +23535,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -18935,7 +23608,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -19027,7 +23700,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -19115,7 +23788,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -19199,7 +23872,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -19277,7 +23950,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -19348,7 +24021,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19467,7 +24140,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19587,7 +24260,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19699,7 +24372,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19810,7 +24483,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -19868,7 +24541,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19921,7 +24594,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24652,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -20061,7 +24734,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -20109,7 +24782,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -20190,7 +24863,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20248,7 +24921,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20331,7 +25004,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20389,7 +25062,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20460,7 +25133,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20607,7 +25280,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20665,7 +25338,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20790,7 +25463,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20850,7 +25523,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20942,7 +25615,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -21020,7 +25693,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -21098,7 +25771,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -21176,7 +25849,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21254,7 +25927,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21346,7 +26019,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21427,7 +26100,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21505,7 +26178,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21583,7 +26256,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21661,7 +26334,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21714,6 +26387,84 @@ ] } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21739,7 +26490,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21834,7 +26585,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -21904,7 +26655,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -21987,7 +26738,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -22053,7 +26804,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -22139,7 +26890,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -22207,7 +26958,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22292,7 +27043,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22350,7 +27101,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22442,7 +27193,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22508,7 +27259,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22603,7 +27354,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22671,7 +27422,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22809,7 +27560,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22867,7 +27618,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -22987,7 +27738,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -23053,7 +27804,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -23150,7 +27901,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23218,7 +27969,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23319,7 +28070,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23397,7 +28148,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23526,7 +28277,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23664,7 +28415,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23740,7 +28491,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23960,7 +28711,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24223,7 +28974,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24443,7 +29194,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24660,7 +29411,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24895,7 +29646,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -25112,7 +29863,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -25170,7 +29921,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25288,7 +30039,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25354,7 +30105,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25475,7 +30226,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25543,7 +30294,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25609,7 +30360,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25682,7 +30433,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -25752,7 +30503,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -25835,7 +30586,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25955,7 +30706,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -26036,7 +30787,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -26089,7 +30840,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -26149,7 +30900,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -26207,7 +30958,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26279,7 +31030,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -26546,7 +31297,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -26595,7 +31346,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -26645,7 +31396,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -26739,7 +31490,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26797,7 +31548,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26867,7 +31618,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26926,7 +31677,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -27188,7 +31939,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -27249,7 +32000,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27326,7 +32077,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27406,7 +32157,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -27506,7 +32257,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -27585,7 +32336,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -27691,7 +32442,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27788,7 +32539,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27850,7 +32601,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27917,7 +32668,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -28002,7 +32753,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -28069,7 +32820,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -28140,7 +32891,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -28204,7 +32955,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -28271,7 +33022,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -28349,7 +33100,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28408,7 +33159,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28498,7 +33249,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28565,7 +33316,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28657,7 +33408,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28724,7 +33475,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28796,7 +33547,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28933,7 +33684,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -28992,7 +33743,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -29125,7 +33876,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -29184,7 +33935,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29266,7 +34017,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29355,7 +34106,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29424,7 +34175,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29512,7 +34263,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29581,7 +34332,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29659,7 +34410,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29865,7 +34616,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29943,7 +34694,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -30013,7 +34764,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -30091,7 +34842,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -30165,7 +34916,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30254,7 +35005,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30315,7 +35066,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30389,7 +35140,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30450,7 +35201,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30520,7 +35271,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30602,7 +35353,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30714,7 +35465,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30783,7 +35534,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30868,7 +35619,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30939,7 +35690,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -31032,7 +35783,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -31092,7 +35843,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31170,7 +35921,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31250,7 +36001,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -31334,7 +36085,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31394,7 +36145,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31465,7 +36216,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31525,7 +36276,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31597,7 +36348,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31692,7 +36443,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31783,7 +36534,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31872,7 +36623,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31941,7 +36692,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -32002,7 +36753,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -32093,7 +36844,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32184,7 +36935,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32310,7 +37061,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32422,7 +37173,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32532,7 +37283,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32602,7 +37353,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32656,7 +37407,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32717,7 +37468,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32796,7 +37547,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32878,7 +37629,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -32958,7 +37709,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -33029,7 +37780,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -33111,7 +37862,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -33185,7 +37936,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33257,7 +38008,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33316,7 +38067,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33375,7 +38126,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33434,7 +38185,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33495,7 +38246,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33574,7 +38325,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33653,7 +38404,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33730,7 +38481,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33789,7 +38540,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33866,7 +38617,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33925,7 +38676,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -33979,7 +38730,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -34035,7 +38786,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -34104,7 +38855,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -34181,7 +38932,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34253,7 +39004,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34364,7 +39115,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34432,7 +39183,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34522,7 +39273,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34592,7 +39343,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34674,7 +39425,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34753,7 +39504,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34832,7 +39583,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34927,7 +39678,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -35008,7 +39759,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -35091,7 +39842,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -35157,7 +39908,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35211,7 +39962,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", @@ -35223,7 +39974,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35306,7 +40057,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35390,7 +40141,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35461,7 +40212,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35514,7 +40265,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35626,13 +40377,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35651,13 +40427,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35682,7 +40483,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35707,7 +40508,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35726,13 +40527,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35757,7 +40583,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35782,7 +40608,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35807,7 +40633,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35832,7 +40658,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35857,7 +40683,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35882,7 +40708,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35907,7 +40733,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35932,7 +40758,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35957,7 +40783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35982,7 +40808,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36007,7 +40833,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36032,7 +40858,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36057,7 +40883,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36082,7 +40908,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36107,7 +40933,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36132,7 +40958,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36157,7 +40983,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36182,7 +41008,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36207,7 +41033,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36232,7 +41058,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36257,7 +41083,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36282,7 +41108,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36307,7 +41133,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36332,7 +41158,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36357,7 +41183,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36382,7 +41208,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36407,7 +41233,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36432,7 +41258,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36457,7 +41283,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36482,7 +41308,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36507,7 +41333,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36532,7 +41358,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36557,7 +41383,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36582,7 +41408,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36607,7 +41433,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36632,7 +41458,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36657,7 +41483,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36682,7 +41508,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36707,7 +41533,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36732,7 +41558,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36757,7 +41583,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37712,6 +42538,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37784,6 +43508,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40693,6 +46546,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40919,6 +46777,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -40991,7 +46850,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41710,12 +47572,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41752,6 +47626,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41761,6 +47644,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41793,13 +47685,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41820,12 +47716,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41853,6 +47761,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41862,6 +47779,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41893,17 +47819,52 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -43083,6 +49044,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43303,6 +49270,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 4515d98fb5..96f69b1465 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4208,7 +4208,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4281,7 +4281,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4364,7 +4364,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4424,7 +4424,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4503,7 +4503,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4563,7 +4563,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4621,7 +4621,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -4644,7 +4644,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4750,7 +4750,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4818,7 +4818,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4920,7 +4920,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4988,7 +4988,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5024,7 +5024,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5070,7 +5070,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5106,7 +5106,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5177,7 +5177,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5213,7 +5213,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5286,7 +5286,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5322,7 +5322,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5370,7 +5370,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5393,7 +5393,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5429,7 +5429,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5502,7 +5502,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5538,7 +5538,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5609,7 +5609,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5645,7 +5645,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5679,7 +5679,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5706,7 +5706,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5718,12 +5718,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 352, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5754,7 +5754,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5774,7 +5774,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -5835,7 +5835,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5871,7 +5871,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5892,7 +5892,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -5914,7 +5914,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5954,7 +5954,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5990,7 +5990,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6016,19 +6016,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6073,7 +6073,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6109,7 +6109,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6136,26 +6136,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6194,7 +6194,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6230,7 +6230,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6256,19 +6256,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6313,7 +6313,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6349,7 +6349,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6376,26 +6376,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6434,7 +6434,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6470,7 +6470,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6496,7 +6496,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6541,7 +6541,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6577,7 +6577,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6604,14 +6604,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6650,7 +6650,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6686,7 +6686,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6700,7 +6700,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -6784,7 +6784,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6820,7 +6820,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6904,7 +6904,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6940,7 +6940,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6980,7 +6980,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7019,7 +7019,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7055,7 +7055,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7126,7 +7126,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7162,7 +7162,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7196,7 +7196,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7264,7 +7264,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7300,7 +7300,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7334,7 +7334,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7370,7 +7370,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7411,7 +7411,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7447,7 +7447,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7481,7 +7481,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7514,7 +7514,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7597,7 +7597,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7608,7 +7608,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server" ], @@ -7617,7 +7616,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7753,7 +7751,7 @@ ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update 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.", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -7763,7 +7761,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7778,6 +7776,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Key": [] @@ -7853,7 +7869,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7946,7 +7962,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8033,7 +8049,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8101,7 +8117,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8114,7 +8130,7 @@ ], "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8124,7 +8140,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8139,6 +8155,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a 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." + } + ], "auth": { "Project": [], "Session": [] @@ -8230,7 +8265,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8328,7 +8363,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8409,7 +8444,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8421,8 +8456,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8434,9 +8467,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8479,7 +8510,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -8520,7 +8551,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8532,8 +8563,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8545,9 +8574,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8629,7 +8656,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8708,8 +8735,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8837,7 +8864,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8907,7 +8934,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8959,6 +8986,4449 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 370, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique 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, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row 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": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "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).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column 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 rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "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": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8982,7 +13452,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9055,7 +13525,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -9307,7 +13777,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9357,7 +13827,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9408,7 +13878,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9468,7 +13938,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9716,7 +14186,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9778,7 +14248,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -9856,7 +14326,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9937,7 +14407,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -10030,7 +14500,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -10116,7 +14586,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10223,7 +14693,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10320,7 +14790,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -10383,7 +14853,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -10451,7 +14921,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -10537,7 +15007,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10605,7 +15075,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10680,7 +15150,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10798,7 +15268,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10864,7 +15334,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10932,7 +15402,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -10992,7 +15462,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -11083,7 +15553,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11151,7 +15621,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -11244,7 +15714,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11314,7 +15784,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11389,7 +15859,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -11462,7 +15932,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11512,7 +15982,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11562,7 +16032,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11612,7 +16082,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11671,7 +16141,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11721,7 +16191,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11771,7 +16241,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11832,7 +16302,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11893,7 +16363,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11963,7 +16433,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -12024,7 +16494,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12109,7 +16579,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12170,7 +16640,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12231,7 +16701,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12292,7 +16762,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12353,7 +16823,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12414,7 +16884,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12475,7 +16945,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12536,7 +17006,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12597,7 +17067,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12647,7 +17117,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12697,7 +17167,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12747,7 +17217,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12800,7 +17270,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12853,7 +17323,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12906,7 +17376,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12959,7 +17429,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -13012,7 +17482,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -13065,7 +17535,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13118,7 +17588,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13171,7 +17641,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13247,7 +17717,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -13406,7 +17876,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -13562,7 +18032,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -13758,7 +18228,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -13953,7 +18423,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -14072,7 +18542,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14187,7 +18657,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14243,7 +18713,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -14304,7 +18774,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14377,7 +18847,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14450,7 +18920,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14526,7 +18996,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14642,7 +19112,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14756,7 +19226,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -14848,7 +19318,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -14938,7 +19408,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -15066,7 +19536,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -15192,7 +19662,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15296,7 +19766,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15398,7 +19868,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -15514,7 +19984,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15628,7 +20098,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15788,7 +20258,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15945,7 +20415,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16049,7 +20519,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -16151,7 +20621,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16255,7 +20725,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -16357,7 +20827,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16461,7 +20931,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16563,7 +21033,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16667,7 +21137,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16767,7 +21237,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16823,7 +21293,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -16884,7 +21354,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -16957,7 +21427,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17030,7 +21500,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -17104,7 +21574,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -17193,7 +21663,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -17254,7 +21724,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -17334,7 +21804,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17395,7 +21865,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17468,7 +21938,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17550,7 +22020,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17639,7 +22109,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17703,7 +22173,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17775,7 +22245,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -17848,7 +22318,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -18116,7 +22586,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -18166,7 +22636,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -18217,7 +22687,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -18277,7 +22747,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -18540,7 +23010,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18602,7 +23072,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18680,7 +23150,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -18761,7 +23231,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -18862,7 +23332,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -18942,7 +23412,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -19049,7 +23519,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -19147,7 +23617,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -19210,7 +23680,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -19278,7 +23748,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -19364,7 +23834,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -19432,7 +23902,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19504,7 +23974,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19569,7 +24039,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19637,7 +24107,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19697,7 +24167,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19788,7 +24258,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19856,7 +24326,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19949,7 +24419,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -20017,7 +24487,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20090,7 +24560,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20228,7 +24698,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20288,7 +24758,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20422,7 +24892,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20482,7 +24952,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20566,7 +25036,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20657,7 +25127,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20728,7 +25198,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20818,7 +25288,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20889,7 +25359,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -20969,7 +25439,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -21177,7 +25647,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21257,7 +25727,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21333,7 +25803,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21424,7 +25894,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21487,7 +25957,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21563,7 +26033,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21626,7 +26096,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21710,7 +26180,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21824,7 +26294,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21895,7 +26365,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21982,7 +26452,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22055,7 +26525,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22150,7 +26620,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -22212,7 +26682,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22292,7 +26762,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22373,7 +26843,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -22458,7 +26928,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22519,7 +26989,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22591,7 +27061,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22652,7 +27122,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22725,7 +27195,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22821,7 +27291,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22913,7 +27383,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -23003,7 +27473,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -23073,7 +27543,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -23135,7 +27605,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -23227,7 +27697,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23319,7 +27789,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23446,7 +27916,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23559,7 +28029,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23670,7 +28140,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23725,7 +28195,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23787,7 +28257,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23867,7 +28337,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23950,7 +28420,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24031,7 +28501,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -24103,7 +28573,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -24186,7 +28656,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24261,7 +28731,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24334,7 +28804,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24394,7 +28864,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24454,7 +28924,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24514,7 +28984,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24576,7 +29046,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24656,7 +29126,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24736,7 +29206,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24814,7 +29284,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24874,7 +29344,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -24952,7 +29422,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -25012,7 +29482,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25067,7 +29537,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -25124,7 +29594,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25194,7 +29664,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25272,7 +29742,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25345,7 +29815,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25457,7 +29927,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25526,7 +29996,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25617,7 +30087,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25688,7 +30158,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25771,7 +30241,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25851,7 +30321,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25983,13 +30453,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26008,13 +30503,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26039,7 +30559,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26064,7 +30584,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26083,13 +30603,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26114,7 +30659,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26139,7 +30684,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26164,7 +30709,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26189,7 +30734,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26214,7 +30759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26239,7 +30784,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26264,7 +30809,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26289,7 +30834,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26314,7 +30859,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26339,7 +30884,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26364,7 +30909,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26389,7 +30934,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26414,7 +30959,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26439,7 +30984,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26464,7 +31009,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26489,7 +31034,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26514,7 +31059,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26539,7 +31084,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26564,7 +31109,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26589,7 +31134,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26614,7 +31159,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26639,7 +31184,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26664,7 +31209,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26689,7 +31234,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26714,7 +31259,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26739,7 +31284,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26764,7 +31309,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27719,6 +32264,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27791,6 +33234,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/docs/examples/1.8.x/client-android/java/account/create-anonymous-session.md b/docs/examples/1.8.x/client-android/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..9d805882b8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-email-password-session.md b/docs/examples/1.8.x/client-android/java/account/create-email-password-session.md new file mode 100644 index 0000000000..428b6fddb6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-email-password-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-email-token.md b/docs/examples/1.8.x/client-android/java/account/create-email-token.md new file mode 100644 index 0000000000..869f4a8991 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-email-token.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailToken( + "", // userId + "email@example.com", // email + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-j-w-t.md b/docs/examples/1.8.x/client-android/java/account/create-j-w-t.md new file mode 100644 index 0000000000..9e3bd287f3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createJWT(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..6253e00d58 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMagicURLToken( + "", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-android/java/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..54781f2dc8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-mfa-authenticator.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-android/java/account/create-mfa-challenge.md new file mode 100644 index 0000000000..87a56fe350 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/java/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..ab50734215 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md b/docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md new file mode 100644 index 0000000000..4420859ce3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md b/docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md new file mode 100644 index 0000000000..e5590c8ceb --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-phone-token.md b/docs/examples/1.8.x/client-android/java/account/create-phone-token.md new file mode 100644 index 0000000000..19d90b3475 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-phone-token.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneToken( + "", // userId + "+12065550100", // phone + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-phone-verification.md b/docs/examples/1.8.x/client-android/java/account/create-phone-verification.md new file mode 100644 index 0000000000..8c16b6c268 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-phone-verification.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-push-target.md b/docs/examples/1.8.x/client-android/java/account/create-push-target.md new file mode 100644 index 0000000000..d434a5c6f6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-push-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPushTarget( + "", // targetId + "", // identifier + "", // providerId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-recovery.md b/docs/examples/1.8.x/client-android/java/account/create-recovery.md new file mode 100644 index 0000000000..5592c6eb66 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-recovery.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-session.md b/docs/examples/1.8.x/client-android/java/account/create-session.md new file mode 100644 index 0000000000..0c59a802b1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-verification.md b/docs/examples/1.8.x/client-android/java/account/create-verification.md new file mode 100644 index 0000000000..e91acc85f9 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-verification.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create.md b/docs/examples/1.8.x/client-android/java/account/create.md new file mode 100644 index 0000000000..ad04805ce3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.create( + "", // userId + "email@example.com", // email + "", // password + "", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-identity.md b/docs/examples/1.8.x/client-android/java/account/delete-identity.md new file mode 100644 index 0000000000..d556722769 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-identity.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteIdentity( + "", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-android/java/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..4a9693bf8c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-mfa-authenticator.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-push-target.md b/docs/examples/1.8.x/client-android/java/account/delete-push-target.md new file mode 100644 index 0000000000..00ab902792 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-push-target.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deletePushTarget( + "", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-session.md b/docs/examples/1.8.x/client-android/java/account/delete-session.md new file mode 100644 index 0000000000..99d2f8e888 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-sessions.md b/docs/examples/1.8.x/client-android/java/account/delete-sessions.md new file mode 100644 index 0000000000..e93f3e33ac --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/java/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..8274bb351a --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/get-prefs.md b/docs/examples/1.8.x/client-android/java/account/get-prefs.md new file mode 100644 index 0000000000..5bb11a4a95 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get-prefs.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/get-session.md b/docs/examples/1.8.x/client-android/java/account/get-session.md new file mode 100644 index 0000000000..288cd3b3ba --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/get.md b/docs/examples/1.8.x/client-android/java/account/get.md new file mode 100644 index 0000000000..6b5eb3b7fa --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/list-identities.md b/docs/examples/1.8.x/client-android/java/account/list-identities.md new file mode 100644 index 0000000000..d4a6f9f31d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-identities.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listIdentities( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/list-logs.md b/docs/examples/1.8.x/client-android/java/account/list-logs.md new file mode 100644 index 0000000000..951a479f98 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-logs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listLogs( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/list-mfa-factors.md b/docs/examples/1.8.x/client-android/java/account/list-mfa-factors.md new file mode 100644 index 0000000000..9ea8331620 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-mfa-factors.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listMfaFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/list-sessions.md b/docs/examples/1.8.x/client-android/java/account/list-sessions.md new file mode 100644 index 0000000000..8946d96e7c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/update-email.md b/docs/examples/1.8.x/client-android/java/account/update-email.md new file mode 100644 index 0000000000..ac80e451d0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-email.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-m-f-a.md b/docs/examples/1.8.x/client-android/java/account/update-m-f-a.md new file mode 100644 index 0000000000..b765cda94a --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-m-f-a.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..5893aa6e6b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-android/java/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b8016e75f2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaAuthenticator( + AuthenticatorType.TOTP, // type + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-android/java/account/update-mfa-challenge.md new file mode 100644 index 0000000000..c6401504d8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaChallenge( + "", // challengeId + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/java/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..650ae24128 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/update-name.md b/docs/examples/1.8.x/client-android/java/account/update-name.md new file mode 100644 index 0000000000..47582c2b30 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-name.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateName( + "", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-password.md b/docs/examples/1.8.x/client-android/java/account/update-password.md new file mode 100644 index 0000000000..09f572eb31 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-password.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePassword( + "", // password + "password", // oldPassword (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-phone-session.md b/docs/examples/1.8.x/client-android/java/account/update-phone-session.md new file mode 100644 index 0000000000..2e1b880017 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-phone-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-phone-verification.md b/docs/examples/1.8.x/client-android/java/account/update-phone-verification.md new file mode 100644 index 0000000000..f93ae6906f --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-phone-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneVerification( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-phone.md b/docs/examples/1.8.x/client-android/java/account/update-phone.md new file mode 100644 index 0000000000..fae9bfaaec --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-phone.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-prefs.md b/docs/examples/1.8.x/client-android/java/account/update-prefs.md new file mode 100644 index 0000000000..f1a16c7de0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-push-target.md b/docs/examples/1.8.x/client-android/java/account/update-push-target.md new file mode 100644 index 0000000000..197a9095a7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-push-target.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePushTarget( + "", // targetId + "", // identifier + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-recovery.md b/docs/examples/1.8.x/client-android/java/account/update-recovery.md new file mode 100644 index 0000000000..953bde4f26 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-recovery.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateRecovery( + "", // userId + "", // secret + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-session.md b/docs/examples/1.8.x/client-android/java/account/update-session.md new file mode 100644 index 0000000000..ed82840836 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-status.md b/docs/examples/1.8.x/client-android/java/account/update-status.md new file mode 100644 index 0000000000..9a283c092c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-status.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/update-verification.md b/docs/examples/1.8.x/client-android/java/account/update-verification.md new file mode 100644 index 0000000000..caa3869e25 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateVerification( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-browser.md b/docs/examples/1.8.x/client-android/java/avatars/get-browser.md new file mode 100644 index 0000000000..1b6632f30a --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-browser.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-credit-card.md b/docs/examples/1.8.x/client-android/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..e2ac2c26cd --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-credit-card.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-favicon.md b/docs/examples/1.8.x/client-android/java/avatars/get-favicon.md new file mode 100644 index 0000000000..70373a607b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-favicon.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-flag.md b/docs/examples/1.8.x/client-android/java/avatars/get-flag.md new file mode 100644 index 0000000000..689e27fe35 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-flag.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-image.md b/docs/examples/1.8.x/client-android/java/avatars/get-image.md new file mode 100644 index 0000000000..71a90dd1c2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-image.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-initials.md b/docs/examples/1.8.x/client-android/java/avatars/get-initials.md new file mode 100644 index 0000000000..ca16ee7e36 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-initials.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + "", // name (optional) + 0, // width (optional) + 0, // height (optional) + "", // background (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-q-r.md b/docs/examples/1.8.x/client-android/java/avatars/get-q-r.md new file mode 100644 index 0000000000..781acf6741 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-q-r.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/create-document.md b/docs/examples/1.8.x/client-android/java/databases/create-document.md new file mode 100644 index 0000000000..7fb129bb0b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/create-document.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/create-documents.md b/docs/examples/1.8.x/client-android/java/databases/create-documents.md new file mode 100644 index 0000000000..d5629b803f --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/create-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey(""); // + +Databases databases = new Databases(client); + +databases.createDocuments( + "", // databaseId + "", // collectionId + listOf(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/delete-document.md b/docs/examples/1.8.x/client-android/java/databases/delete-document.md new file mode 100644 index 0000000000..5288e53bed --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/delete-document.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/get-document.md b/docs/examples/1.8.x/client-android/java/databases/get-document.md new file mode 100644 index 0000000000..e7ae2079ed --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/get-document.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/list-documents.md b/docs/examples/1.8.x/client-android/java/databases/list-documents.md new file mode 100644 index 0000000000..606d67705d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/list-documents.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.listDocuments( + "", // databaseId + "", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/update-document.md b/docs/examples/1.8.x/client-android/java/databases/update-document.md new file mode 100644 index 0000000000..baa827cdf5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/update-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md new file mode 100644 index 0000000000..ba7336f3f9 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/functions/create-execution.md b/docs/examples/1.8.x/client-android/java/functions/create-execution.md new file mode 100644 index 0000000000..c138b0ef86 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/functions/create-execution.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.createExecution( + "", // functionId + "", // body (optional) + false, // async (optional) + "", // path (optional) + ExecutionMethod.GET, // method (optional) + mapOf( "a" to "b" ), // headers (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/functions/get-execution.md b/docs/examples/1.8.x/client-android/java/functions/get-execution.md new file mode 100644 index 0000000000..f3195fa126 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/functions/get-execution.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.getExecution( + "", // functionId + "", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/functions/list-executions.md b/docs/examples/1.8.x/client-android/java/functions/list-executions.md new file mode 100644 index 0000000000..0270cf0ead --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/functions/list-executions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.listExecutions( + "", // functionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/graphql/mutation.md b/docs/examples/1.8.x/client-android/java/graphql/mutation.md new file mode 100644 index 0000000000..25f095e1b1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/graphql/mutation.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/graphql/query.md b/docs/examples/1.8.x/client-android/java/graphql/query.md new file mode 100644 index 0000000000..6b2a04d0b6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/graphql/query.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/locale/get.md b/docs/examples/1.8.x/client-android/java/locale/get.md new file mode 100644 index 0000000000..89e1e88b26 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-codes.md b/docs/examples/1.8.x/client-android/java/locale/list-codes.md new file mode 100644 index 0000000000..85a96fce77 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-continents.md b/docs/examples/1.8.x/client-android/java/locale/list-continents.md new file mode 100644 index 0000000000..6f4572d572 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-continents.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..51458a929d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-countries-phones.md b/docs/examples/1.8.x/client-android/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..93438d2130 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-countries-phones.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-countries.md b/docs/examples/1.8.x/client-android/java/locale/list-countries.md new file mode 100644 index 0000000000..5cd5525e93 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-countries.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-currencies.md b/docs/examples/1.8.x/client-android/java/locale/list-currencies.md new file mode 100644 index 0000000000..d3ef02c865 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-currencies.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-languages.md b/docs/examples/1.8.x/client-android/java/locale/list-languages.md new file mode 100644 index 0000000000..0d724943a9 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-languages.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/messaging/create-subscriber.md b/docs/examples/1.8.x/client-android/java/messaging/create-subscriber.md new file mode 100644 index 0000000000..5616435ab5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/messaging/create-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "", // topicId + "", // subscriberId + "", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-android/java/messaging/delete-subscriber.md new file mode 100644 index 0000000000..9adae5e7df --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/messaging/delete-subscriber.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "", // topicId + "", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/create-file.md b/docs/examples/1.8.x/client-android/java/storage/create-file.md new file mode 100644 index 0000000000..598e683150 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/create-file.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.createFile( + "", // bucketId + "", // fileId + InputFile.fromPath("file.png"), // file + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/delete-file.md b/docs/examples/1.8.x/client-android/java/storage/delete-file.md new file mode 100644 index 0000000000..5c63ae7cd5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/delete-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.deleteFile( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file-download.md b/docs/examples/1.8.x/client-android/java/storage/get-file-download.md new file mode 100644 index 0000000000..73a8617fdd --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file-download.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileDownload( + "", // bucketId + "", // fileId + "", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file-preview.md b/docs/examples/1.8.x/client-android/java/storage/get-file-preview.md new file mode 100644 index 0000000000..67b92ebf85 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file-preview.md @@ -0,0 +1,35 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFilePreview( + "", // bucketId + "", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.CENTER, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + "", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "", // background (optional) + ImageFormat.JPG, // output (optional) + "", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file-view.md b/docs/examples/1.8.x/client-android/java/storage/get-file-view.md new file mode 100644 index 0000000000..b042b1f451 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file-view.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileView( + "", // bucketId + "", // fileId + "", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file.md b/docs/examples/1.8.x/client-android/java/storage/get-file.md new file mode 100644 index 0000000000..c9cc00d8f7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFile( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/list-files.md b/docs/examples/1.8.x/client-android/java/storage/list-files.md new file mode 100644 index 0000000000..a87286c6d6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/list-files.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.listFiles( + "", // bucketId + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/update-file.md b/docs/examples/1.8.x/client-android/java/storage/update-file.md new file mode 100644 index 0000000000..14fa77939d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/update-file.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.updateFile( + "", // bucketId + "", // fileId + "", // name (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/create-row.md b/docs/examples/1.8.x/client-android/java/tables/create-row.md new file mode 100644 index 0000000000..8102b82c75 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/create-row.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.createRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/create-rows.md b/docs/examples/1.8.x/client-android/java/tables/create-rows.md new file mode 100644 index 0000000000..26f5d67789 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey(""); // + +Tables tables = new Tables(client); + +tables.createRows( + "", // databaseId + "", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/delete-row.md b/docs/examples/1.8.x/client-android/java/tables/delete-row.md new file mode 100644 index 0000000000..596a8b7aca --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/delete-row.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.deleteRow( + "", // databaseId + "", // tableId + "", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/get-row.md b/docs/examples/1.8.x/client-android/java/tables/get-row.md new file mode 100644 index 0000000000..882a195376 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/get-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.getRow( + "", // databaseId + "", // tableId + "", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/list-rows.md b/docs/examples/1.8.x/client-android/java/tables/list-rows.md new file mode 100644 index 0000000000..4d37570246 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/list-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.listRows( + "", // databaseId + "", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/update-row.md b/docs/examples/1.8.x/client-android/java/tables/update-row.md new file mode 100644 index 0000000000..0421c9cffb --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/update-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.updateRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/upsert-row.md b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md new file mode 100644 index 0000000000..a8be0cfc6c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.upsertRow( + "", // databaseId + "", // tableId + "", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/create-membership.md b/docs/examples/1.8.x/client-android/java/teams/create-membership.md new file mode 100644 index 0000000000..bb5293ef63 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/create-membership.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.createMembership( + "", // teamId + listOf(), // roles + "email@example.com", // email (optional) + "", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/create.md b/docs/examples/1.8.x/client-android/java/teams/create.md new file mode 100644 index 0000000000..ae2fdf32c8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/create.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.create( + "", // teamId + "", // name + listOf(), // roles (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/delete-membership.md b/docs/examples/1.8.x/client-android/java/teams/delete-membership.md new file mode 100644 index 0000000000..c8bb088cc6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/delete-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.deleteMembership( + "", // teamId + "", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/delete.md b/docs/examples/1.8.x/client-android/java/teams/delete.md new file mode 100644 index 0000000000..74f6a4f997 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.delete( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/get-membership.md b/docs/examples/1.8.x/client-android/java/teams/get-membership.md new file mode 100644 index 0000000000..e9dc5786d6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/get-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getMembership( + "", // teamId + "", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/get-prefs.md b/docs/examples/1.8.x/client-android/java/teams/get-prefs.md new file mode 100644 index 0000000000..8ba14355a1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/get-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getPrefs( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/get.md b/docs/examples/1.8.x/client-android/java/teams/get.md new file mode 100644 index 0000000000..f00057a822 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.get( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/list-memberships.md b/docs/examples/1.8.x/client-android/java/teams/list-memberships.md new file mode 100644 index 0000000000..216ca40e6d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/list-memberships.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.listMemberships( + "", // teamId + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/list.md b/docs/examples/1.8.x/client-android/java/teams/list.md new file mode 100644 index 0000000000..b69f21ed43 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/list.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.list( + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-membership-status.md b/docs/examples/1.8.x/client-android/java/teams/update-membership-status.md new file mode 100644 index 0000000000..4b31ed55ec --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-membership-status.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "", // teamId + "", // membershipId + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-membership.md b/docs/examples/1.8.x/client-android/java/teams/update-membership.md new file mode 100644 index 0000000000..481be43107 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembership( + "", // teamId + "", // membershipId + listOf(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-name.md b/docs/examples/1.8.x/client-android/java/teams/update-name.md new file mode 100644 index 0000000000..207bcc81e3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateName( + "", // teamId + "", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-prefs.md b/docs/examples/1.8.x/client-android/java/teams/update-prefs.md new file mode 100644 index 0000000000..5a0186ff31 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updatePrefs( + "", // teamId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-anonymous-session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..d2966a18cd --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createAnonymousSession() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-email-password-session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-email-password-session.md new file mode 100644 index 0000000000..a327cf280e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailPasswordSession( + email = "email@example.com", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-email-token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-email-token.md new file mode 100644 index 0000000000..37c9e1b380 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-email-token.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailToken( + userId = "", + email = "email@example.com", + phrase = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md b/docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..c87eaf3128 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createJWT() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..76f4c91884 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMagicURLToken( + userId = "", + email = "email@example.com", + url = "https://example.com", // (optional) + phrase = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ffb2f2f9bf --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaAuthenticator( + type = AuthenticatorType.TOTP, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-challenge.md new file mode 100644 index 0000000000..36b12d3f98 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaChallenge( + factor = AuthenticationFactor.EMAIL, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..974c8f25a0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md new file mode 100644 index 0000000000..61ea634ad7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Session( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md new file mode 100644 index 0000000000..cdd2ef3445 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-phone-token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-token.md new file mode 100644 index 0000000000..4eb1a9ac4e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-token.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneToken( + userId = "", + phone = "+12065550100", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-phone-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..f7594668fa --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneVerification() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-push-target.md b/docs/examples/1.8.x/client-android/kotlin/account/create-push-target.md new file mode 100644 index 0000000000..59b252be15 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-push-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPushTarget( + targetId = "", + identifier = "", + providerId = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-recovery.md b/docs/examples/1.8.x/client-android/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..7e13138111 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-recovery.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createRecovery( + email = "email@example.com", + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-session.md new file mode 100644 index 0000000000..ab9e20e7e2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/create-verification.md new file mode 100644 index 0000000000..669b00ba18 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-verification.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createVerification( + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create.md b/docs/examples/1.8.x/client-android/kotlin/account/create.md new file mode 100644 index 0000000000..16f3a60ded --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.create( + userId = "", + email = "email@example.com", + password = "", + name = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-identity.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..c8d7463685 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-identity.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteIdentity( + identityId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..057e021f6d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteMfaAuthenticator( + type = AuthenticatorType.TOTP, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-push-target.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-push-target.md new file mode 100644 index 0000000000..8e0b418c90 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-push-target.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deletePushTarget( + targetId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-session.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-session.md new file mode 100644 index 0000000000..6af414be27 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-sessions.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..f7e6c71c10 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSessions() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..6201658fe3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get-prefs.md b/docs/examples/1.8.x/client-android/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..85dbb18b43 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get-prefs.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getPrefs() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get-session.md b/docs/examples/1.8.x/client-android/kotlin/account/get-session.md new file mode 100644 index 0000000000..4de64a1487 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get.md b/docs/examples/1.8.x/client-android/kotlin/account/get.md new file mode 100644 index 0000000000..3e85e79ad0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.get() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-identities.md b/docs/examples/1.8.x/client-android/kotlin/account/list-identities.md new file mode 100644 index 0000000000..5908a44a9c --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-identities.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listIdentities( + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-logs.md b/docs/examples/1.8.x/client-android/kotlin/account/list-logs.md new file mode 100644 index 0000000000..385ccc0116 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-logs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listLogs( + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-mfa-factors.md b/docs/examples/1.8.x/client-android/kotlin/account/list-mfa-factors.md new file mode 100644 index 0000000000..09119ab65a --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listMfaFactors() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-sessions.md b/docs/examples/1.8.x/client-android/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..573dd865e2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listSessions() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-email.md b/docs/examples/1.8.x/client-android/kotlin/account/update-email.md new file mode 100644 index 0000000000..0862f112c0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-email.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateEmail( + email = "email@example.com", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md b/docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md new file mode 100644 index 0000000000..f214e78f44 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMFA( + mfa = false, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..2c1a0b0a38 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMagicURLSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..987825e589 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaAuthenticator( + type = AuthenticatorType.TOTP, + otp = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-challenge.md new file mode 100644 index 0000000000..c7f8139f15 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaChallenge( + challengeId = "", + otp = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c0ee3c386f --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-name.md b/docs/examples/1.8.x/client-android/kotlin/account/update-name.md new file mode 100644 index 0000000000..2cb5327ebe --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-name.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateName( + name = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-password.md b/docs/examples/1.8.x/client-android/kotlin/account/update-password.md new file mode 100644 index 0000000000..140ca8b219 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-password.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePassword( + password = "", + oldPassword = "password", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-phone-session.md b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-session.md new file mode 100644 index 0000000000..b3911dd5e0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-phone-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..ad0d5d73eb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneVerification( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-phone.md b/docs/examples/1.8.x/client-android/kotlin/account/update-phone.md new file mode 100644 index 0000000000..84ff508184 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-phone.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhone( + phone = "+12065550100", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-prefs.md b/docs/examples/1.8.x/client-android/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..fdfed577ac --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePrefs( + prefs = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-push-target.md b/docs/examples/1.8.x/client-android/kotlin/account/update-push-target.md new file mode 100644 index 0000000000..5c3816860f --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-push-target.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePushTarget( + targetId = "", + identifier = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-recovery.md b/docs/examples/1.8.x/client-android/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..d505d1afb1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-recovery.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateRecovery( + userId = "", + secret = "", + password = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-session.md b/docs/examples/1.8.x/client-android/kotlin/account/update-session.md new file mode 100644 index 0000000000..6fc9a9f9d2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-status.md b/docs/examples/1.8.x/client-android/kotlin/account/update-status.md new file mode 100644 index 0000000000..b86a25ad4d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-status.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateStatus() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/update-verification.md new file mode 100644 index 0000000000..028eb7c4ce --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateVerification( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-browser.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..d04adfbbdc --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-browser.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-credit-card.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..91c88da5dd --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-favicon.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..01df8cb54b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-flag.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..1dbc1cdf4b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-flag.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-image.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..64166c0a6d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-image.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", + width = 0, // (optional) + height = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-initials.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..883da02744 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-initials.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getInitials( + name = "", // (optional) + width = 0, // (optional) + height = 0, // (optional) + background = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..fa8a38cabb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "", + size = 1, // (optional) + margin = 0, // (optional) + download = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md new file mode 100644 index 0000000000..0bafb315e7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val databases = Databases(client) + +val result = databases.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md new file mode 100644 index 0000000000..6f9e1f98f7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +val databases = Databases(client) + +val result = databases.createDocuments( + databaseId = "", + collectionId = "", + documents = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/delete-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..052bf97f89 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/delete-document.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/get-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/get-document.md new file mode 100644 index 0000000000..157af2b562 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/get-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/list-documents.md b/docs/examples/1.8.x/client-android/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..1cc785fab1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/list-documents.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md new file mode 100644 index 0000000000..d61fdea5b1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md new file mode 100644 index 0000000000..7939fde2be --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val databases = Databases(client) + +val result = databases.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..cb7c60bac1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.createExecution( + functionId = "", + body = "", // (optional) + async = false, // (optional) + path = "", // (optional) + method = ExecutionMethod.GET, // (optional) + headers = mapOf( "a" to "b" ), // (optional) + scheduledAt = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/get-execution.md b/docs/examples/1.8.x/client-android/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..267be53cbb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/functions/get-execution.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.getExecution( + functionId = "", + executionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/list-executions.md b/docs/examples/1.8.x/client-android/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..37ea8b8228 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/functions/list-executions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.listExecutions( + functionId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/graphql/mutation.md b/docs/examples/1.8.x/client-android/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..a3a762203d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/graphql/mutation.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.mutation( + query = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/graphql/query.md b/docs/examples/1.8.x/client-android/kotlin/graphql/query.md new file mode 100644 index 0000000000..13f149cbf0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/graphql/query.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.query( + query = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/get.md b/docs/examples/1.8.x/client-android/kotlin/locale/get.md new file mode 100644 index 0000000000..a116aed349 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.get() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-codes.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..0b63b06e3e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-continents.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..98acdc9b6a --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-continents.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listContinents() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..c01602598b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesEU() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-phones.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..d95c1c6ff6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesPhones() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-countries.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..4775161159 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountries() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-currencies.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..6d0a04f808 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-currencies.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCurrencies() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-languages.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..de588aa077 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-languages.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listLanguages() diff --git a/docs/examples/1.8.x/client-android/kotlin/messaging/create-subscriber.md b/docs/examples/1.8.x/client-android/kotlin/messaging/create-subscriber.md new file mode 100644 index 0000000000..b7e244f041 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.createSubscriber( + topicId = "", + subscriberId = "", + targetId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-android/kotlin/messaging/delete-subscriber.md new file mode 100644 index 0000000000..9e102d6faa --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.deleteSubscriber( + topicId = "", + subscriberId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md new file mode 100644 index 0000000000..1c78c51e67 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.createFile( + bucketId = "", + fileId = "", + file = InputFile.fromPath("file.png"), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/delete-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..ca40f41b71 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/delete-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.deleteFile( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file-download.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..89c6e8a992 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-download.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "", + fileId = "", + token = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..d766dc7174 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "", + fileId = "", + width = 0, // (optional) + height = 0, // (optional) + gravity = ImageGravity.CENTER, // (optional) + quality = -1, // (optional) + borderWidth = 0, // (optional) + borderColor = "", // (optional) + borderRadius = 0, // (optional) + opacity = 0, // (optional) + rotation = -360, // (optional) + background = "", // (optional) + output = ImageFormat.JPG, // (optional) + token = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file-view.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..513e1f9a90 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-view.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "", + fileId = "", + token = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file.md new file mode 100644 index 0000000000..1e9943059b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFile( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/list-files.md b/docs/examples/1.8.x/client-android/kotlin/storage/list-files.md new file mode 100644 index 0000000000..06f6cda4eb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/list-files.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.listFiles( + bucketId = "", + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md new file mode 100644 index 0000000000..116d156ead --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.updateFile( + bucketId = "", + fileId = "", + name = "", // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md new file mode 100644 index 0000000000..8c581bf1d5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val tables = Tables(client) + +val result = tables.createRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md new file mode 100644 index 0000000000..1fde9c50cf --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +val tables = Tables(client) + +val result = tables.createRows( + databaseId = "", + tableId = "", + rows = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md new file mode 100644 index 0000000000..ffa3229f30 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.deleteRow( + databaseId = "", + tableId = "", + rowId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md new file mode 100644 index 0000000000..15dabff397 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.getRow( + databaseId = "", + tableId = "", + rowId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md new file mode 100644 index 0000000000..ff36543938 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.listRows( + databaseId = "", + tableId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md new file mode 100644 index 0000000000..e9b515cef4 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.updateRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md new file mode 100644 index 0000000000..6b7cb6666b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val tables = Tables(client) + +val result = tables.upsertRow( + databaseId = "", + tableId = "", + rowId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/create-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..70eb7ddd19 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/create-membership.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.createMembership( + teamId = "", + roles = listOf(), + email = "email@example.com", // (optional) + userId = "", // (optional) + phone = "+12065550100", // (optional) + url = "https://example.com", // (optional) + name = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/create.md b/docs/examples/1.8.x/client-android/kotlin/teams/create.md new file mode 100644 index 0000000000..dfa4df446e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/create.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.create( + teamId = "", + name = "", + roles = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/delete-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..adf1119761 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/delete-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.deleteMembership( + teamId = "", + membershipId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/delete.md b/docs/examples/1.8.x/client-android/kotlin/teams/delete.md new file mode 100644 index 0000000000..e144a78e3d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.delete( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/get-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..8fb8c54c3b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/get-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getMembership( + teamId = "", + membershipId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/get-prefs.md b/docs/examples/1.8.x/client-android/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..5e892fb49d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/get-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getPrefs( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/get.md b/docs/examples/1.8.x/client-android/kotlin/teams/get.md new file mode 100644 index 0000000000..dbb487d3d6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.get( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/list-memberships.md b/docs/examples/1.8.x/client-android/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..e305403a52 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/list-memberships.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.listMemberships( + teamId = "", + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/list.md b/docs/examples/1.8.x/client-android/kotlin/teams/list.md new file mode 100644 index 0000000000..984858d26c --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/list.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.list( + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-membership-status.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..c3770c7f1e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembershipStatus( + teamId = "", + membershipId = "", + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..86216a8692 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembership( + teamId = "", + membershipId = "", + roles = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-name.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-name.md new file mode 100644 index 0000000000..abeb6dc7c1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateName( + teamId = "", + name = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-prefs.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..d0066a94b3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updatePrefs( + teamId = "", + prefs = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-apple/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..22020a16d9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createAnonymousSession() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-apple/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..5f541a8a15 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-email-token.md b/docs/examples/1.8.x/client-apple/examples/account/create-email-token.md new file mode 100644 index 0000000000..cf82afde8f --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "", + email: "email@example.com", + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..fbcd50401c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let jwt = try await account.createJWT() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..27bbe4137e --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..56799e327e --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaType = try await account.createMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..0b5d385999 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaChallenge = try await account.createMfaChallenge( + factor: .email +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..c0ccb39e86 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..756112e701 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Session( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..21b54e8c9a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-apple/examples/account/create-phone-token.md new file mode 100644 index 0000000000..12b2d4b223 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneToken( + userId: "", + phone: "+12065550100" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-apple/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..f0eb94b6fc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-push-target.md b/docs/examples/1.8.x/client-apple/examples/account/create-push-target.md new file mode 100644 index 0000000000..ce2d194272 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-push-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let target = try await account.createPushTarget( + targetId: "", + identifier: "", + providerId: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-recovery.md b/docs/examples/1.8.x/client-apple/examples/account/create-recovery.md new file mode 100644 index 0000000000..ccfd5ac519 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-session.md b/docs/examples/1.8.x/client-apple/examples/account/create-session.md new file mode 100644 index 0000000000..2065692a16 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-verification.md b/docs/examples/1.8.x/client-apple/examples/account/create-verification.md new file mode 100644 index 0000000000..d3ca74c7c0 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create.md b/docs/examples/1.8.x/client-apple/examples/account/create.md new file mode 100644 index 0000000000..79b4db64ba --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "", + email: "email@example.com", + password: "", + name: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-identity.md b/docs/examples/1.8.x/client-apple/examples/account/delete-identity.md new file mode 100644 index 0000000000..04a3ee5f47 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-apple/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..16cbbe3b72 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-apple/examples/account/delete-push-target.md new file mode 100644 index 0000000000..a96a1b1d05 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-push-target.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deletePushTarget( + targetId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-session.md b/docs/examples/1.8.x/client-apple/examples/account/delete-session.md new file mode 100644 index 0000000000..ea353e8723 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-apple/examples/account/delete-sessions.md new file mode 100644 index 0000000000..51a86bdcc3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-apple/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..2f5d623304 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get-prefs.md b/docs/examples/1.8.x/client-apple/examples/account/get-prefs.md new file mode 100644 index 0000000000..65ce5f5908 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get-session.md b/docs/examples/1.8.x/client-apple/examples/account/get-session.md new file mode 100644 index 0000000000..bd491ff4d7 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get.md b/docs/examples/1.8.x/client-apple/examples/account/get.md new file mode 100644 index 0000000000..1b1213e1da --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-identities.md b/docs/examples/1.8.x/client-apple/examples/account/list-identities.md new file mode 100644 index 0000000000..1d3a999d4a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let identityList = try await account.listIdentities( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-logs.md b/docs/examples/1.8.x/client-apple/examples/account/list-logs.md new file mode 100644 index 0000000000..2c42307f96 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let logList = try await account.listLogs( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-apple/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..f6d7a6fe75 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaFactors = try await account.listMfaFactors() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-sessions.md b/docs/examples/1.8.x/client-apple/examples/account/list-sessions.md new file mode 100644 index 0000000000..99f6930cd2 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-email.md b/docs/examples/1.8.x/client-apple/examples/account/update-email.md new file mode 100644 index 0000000000..037133282b --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-email.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..fe2b04f9a3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..507006b230 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..6a42fb9b6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateMfaAuthenticator( + type: .totp, + otp: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..db9753b777 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateMfaChallenge( + challengeId: "", + otp: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c3b8d412c5 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-name.md b/docs/examples/1.8.x/client-apple/examples/account/update-name.md new file mode 100644 index 0000000000..7f8abf54fb --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-name.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateName( + name: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-password.md b/docs/examples/1.8.x/client-apple/examples/account/update-password.md new file mode 100644 index 0000000000..7fa03caebc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-password.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePassword( + password: "", + oldPassword: "password" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-apple/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f6776d1de1 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-apple/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..0bf2db1f0a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-phone.md b/docs/examples/1.8.x/client-apple/examples/account/update-phone.md new file mode 100644 index 0000000000..604fc85377 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-prefs.md b/docs/examples/1.8.x/client-apple/examples/account/update-prefs.md new file mode 100644 index 0000000000..fea527337b --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-push-target.md b/docs/examples/1.8.x/client-apple/examples/account/update-push-target.md new file mode 100644 index 0000000000..549c4d6c16 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-push-target.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let target = try await account.updatePushTarget( + targetId: "", + identifier: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-recovery.md b/docs/examples/1.8.x/client-apple/examples/account/update-recovery.md new file mode 100644 index 0000000000..536da69b8a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "", + secret: "", + password: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-session.md b/docs/examples/1.8.x/client-apple/examples/account/update-session.md new file mode 100644 index 0000000000..8999b0a310 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-status.md b/docs/examples/1.8.x/client-apple/examples/account/update-status.md new file mode 100644 index 0000000000..892858dfbc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-status.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-verification.md b/docs/examples/1.8.x/client-apple/examples/account/update-verification.md new file mode 100644 index 0000000000..094e10f33c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-browser.md new file mode 100644 index 0000000000..ee0cc99f91 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..779fce3f60 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..b7dc6830c3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-flag.md new file mode 100644 index 0000000000..ba1d77be27 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-image.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-image.md new file mode 100644 index 0000000000..0fe71e1765 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-initials.md new file mode 100644 index 0000000000..2bbfbe6a47 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..3cc650c1b9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md new file mode 100644 index 0000000000..6c2baee728 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-documents.md b/docs/examples/1.8.x/client-apple/examples/databases/create-documents.md new file mode 100644 index 0000000000..d60cf01cd9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +let databases = Databases(client) + +let documentList = try await databases.createDocuments( + databaseId: "", + collectionId: "", + documents: [] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/delete-document.md b/docs/examples/1.8.x/client-apple/examples/databases/delete-document.md new file mode 100644 index 0000000000..301203dc7f --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/get-document.md b/docs/examples/1.8.x/client-apple/examples/databases/get-document.md new file mode 100644 index 0000000000..6e4dc55c6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/list-documents.md b/docs/examples/1.8.x/client-apple/examples/databases/list-documents.md new file mode 100644 index 0000000000..0d624f3a92 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "", + collectionId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/update-document.md b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md new file mode 100644 index 0000000000..af224c8e09 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md new file mode 100644 index 0000000000..bb713146ec --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md new file mode 100644 index 0000000000..7470e9ebf6 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "", + body: "", // optional + async: false, // optional + path: "", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/functions/get-execution.md b/docs/examples/1.8.x/client-apple/examples/functions/get-execution.md new file mode 100644 index 0000000000..787f297b2c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "", + executionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/functions/list-executions.md b/docs/examples/1.8.x/client-apple/examples/functions/list-executions.md new file mode 100644 index 0000000000..1636d96c6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/graphql/mutation.md b/docs/examples/1.8.x/client-apple/examples/graphql/mutation.md new file mode 100644 index 0000000000..6cd2e588f9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/graphql/query.md b/docs/examples/1.8.x/client-apple/examples/graphql/query.md new file mode 100644 index 0000000000..47e4c243fa --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/graphql/query.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/get.md b/docs/examples/1.8.x/client-apple/examples/locale/get.md new file mode 100644 index 0000000000..9c48317a1d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-codes.md b/docs/examples/1.8.x/client-apple/examples/locale/list-codes.md new file mode 100644 index 0000000000..21d693a7b8 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-continents.md b/docs/examples/1.8.x/client-apple/examples/locale/list-continents.md new file mode 100644 index 0000000000..bd44915a34 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..2dc24e5a63 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..f3ab6b1f6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-countries.md b/docs/examples/1.8.x/client-apple/examples/locale/list-countries.md new file mode 100644 index 0000000000..dadcd3ee26 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-apple/examples/locale/list-currencies.md new file mode 100644 index 0000000000..dc20ead45e --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-languages.md b/docs/examples/1.8.x/client-apple/examples/locale/list-languages.md new file mode 100644 index 0000000000..92c1d7b1dc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.8.x/client-apple/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-apple/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..f85d5e6fb1 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "", + subscriberId: "", + targetId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-apple/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..f1cdda95c7 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "", + subscriberId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/create-file.md b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md new file mode 100644 index 0000000000..2db9b20e1b --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "", + fileId: "", + file: InputFile.fromPath("file.png"), + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/delete-file.md b/docs/examples/1.8.x/client-apple/examples/storage/delete-file.md new file mode 100644 index 0000000000..ca721a4a41 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file-download.md new file mode 100644 index 0000000000..9338958ede --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "", + fileId: "", + token: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..1395d7e782 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "", + fileId: "", + width: 0, // optional + height: 0, // optional + gravity: .center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: .jpg, // optional + token: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file-view.md new file mode 100644 index 0000000000..bc5ad02727 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "", + fileId: "", + token: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file.md new file mode 100644 index 0000000000..2730b4d528 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/list-files.md b/docs/examples/1.8.x/client-apple/examples/storage/list-files.md new file mode 100644 index 0000000000..48bd0d065f --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "", + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/update-file.md b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md new file mode 100644 index 0000000000..adef969845 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "", + fileId: "", + name: "", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-row.md b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md new file mode 100644 index 0000000000..533cf2d555 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.createRow( + databaseId: "", + tableId: "", + rowId: "", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md new file mode 100644 index 0000000000..effd748aa0 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +let tables = Tables(client) + +let rowList = try await tables.createRows( + databaseId: "", + tableId: "", + rows: [] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md new file mode 100644 index 0000000000..7d12ec4f4c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let result = try await tables.deleteRow( + databaseId: "", + tableId: "", + rowId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/get-row.md b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md new file mode 100644 index 0000000000..93fbef9e7c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let row = try await tables.getRow( + databaseId: "", + tableId: "", + rowId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md new file mode 100644 index 0000000000..31545cce4d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let rowList = try await tables.listRows( + databaseId: "", + tableId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/update-row.md b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md new file mode 100644 index 0000000000..601c4f0a77 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let row = try await tables.updateRow( + databaseId: "", + tableId: "", + rowId: "", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md new file mode 100644 index 0000000000..eabcb181c3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.upsertRow( + databaseId: "", + tableId: "", + rowId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/create-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/create-membership.md new file mode 100644 index 0000000000..3c6d093c64 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "", + roles: [], + email: "email@example.com", // optional + userId: "", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/create.md b/docs/examples/1.8.x/client-apple/examples/teams/create.md new file mode 100644 index 0000000000..b9f5ea4080 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/create.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "", + name: "", + roles: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/delete-membership.md new file mode 100644 index 0000000000..7c21410bf3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "", + membershipId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/delete.md b/docs/examples/1.8.x/client-apple/examples/teams/delete.md new file mode 100644 index 0000000000..1787b4c749 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/delete.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/get-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/get-membership.md new file mode 100644 index 0000000000..837a92dd04 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "", + membershipId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-apple/examples/teams/get-prefs.md new file mode 100644 index 0000000000..b5b17a3bc2 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/get.md b/docs/examples/1.8.x/client-apple/examples/teams/get.md new file mode 100644 index 0000000000..af358fbb67 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/get.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-apple/examples/teams/list-memberships.md new file mode 100644 index 0000000000..5c8669a3d8 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "", + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/list.md b/docs/examples/1.8.x/client-apple/examples/teams/list.md new file mode 100644 index 0000000000..be81e9c5aa --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/list.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-apple/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..1f3cb39d92 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/update-membership.md new file mode 100644 index 0000000000..eaa61799c2 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "", + membershipId: "", + roles: [] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-name.md b/docs/examples/1.8.x/client-apple/examples/teams/update-name.md new file mode 100644 index 0000000000..ce5188b950 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "", + name: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-apple/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e20ec2ea18 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "", + prefs: [:] +) + diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..cdcd98ddb2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..66bc2ab5f4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-email-token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-email-token.md new file mode 100644 index 0000000000..2640894502 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '', + email: 'email@example.com', + phrase: false, // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..b9cbc8f5a5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Jwt result = await account.createJWT(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..454a951022 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ca66149654 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-authenticator.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaType result = await account.createMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..6815e5c52f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaChallenge result = await account.createMfaChallenge( + factor: AuthenticationFactor.email, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..274dc598a8 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..ab53f4a777 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Session( + provider: OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..d6b6c72c7e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Token( + provider: OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-token.md new file mode 100644 index 0000000000..ff0187f0dc --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '', + phone: '+12065550100', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..11e215a060 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-verification.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-push-target.md b/docs/examples/1.8.x/client-flutter/examples/account/create-push-target.md new file mode 100644 index 0000000000..fd1755e3c5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-push-target.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Target result = await account.createPushTarget( + targetId: '', + identifier: '', + providerId: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-recovery.md b/docs/examples/1.8.x/client-flutter/examples/account/create-recovery.md new file mode 100644 index 0000000000..44985beb80 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-session.md new file mode 100644 index 0000000000..e54e68a317 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/create-verification.md new file mode 100644 index 0000000000..8f96997249 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-verification.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create.md b/docs/examples/1.8.x/client-flutter/examples/account/create.md new file mode 100644 index 0000000000..ae0d526944 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.create( + userId: '', + email: 'email@example.com', + password: '', + name: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-identity.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-identity.md new file mode 100644 index 0000000000..849fa726a4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-identity.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..bf4b0c509b --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-push-target.md new file mode 100644 index 0000000000..6393d4ed4e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-push-target.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deletePushTarget( + targetId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-session.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-session.md new file mode 100644 index 0000000000..55abb18c85 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteSession( + sessionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-sessions.md new file mode 100644 index 0000000000..c50b611cac --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-sessions.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteSessions(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-flutter/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..f9d50131e5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get-prefs.md b/docs/examples/1.8.x/client-flutter/examples/account/get-prefs.md new file mode 100644 index 0000000000..9332da3a63 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get-prefs.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Preferences result = await account.getPrefs(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get-session.md b/docs/examples/1.8.x/client-flutter/examples/account/get-session.md new file mode 100644 index 0000000000..d68afcecd2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get.md b/docs/examples/1.8.x/client-flutter/examples/account/get.md new file mode 100644 index 0000000000..a318617f78 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.get(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-identities.md b/docs/examples/1.8.x/client-flutter/examples/account/list-identities.md new file mode 100644 index 0000000000..9d2ad83c17 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-identities.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-logs.md b/docs/examples/1.8.x/client-flutter/examples/account/list-logs.md new file mode 100644 index 0000000000..6d9b120991 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-logs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +LogList result = await account.listLogs( + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-flutter/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..9f945400ac --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-mfa-factors.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaFactors result = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-sessions.md b/docs/examples/1.8.x/client-flutter/examples/account/list-sessions.md new file mode 100644 index 0000000000..fd1d0e080c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-sessions.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +SessionList result = await account.listSessions(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-email.md b/docs/examples/1.8.x/client-flutter/examples/account/update-email.md new file mode 100644 index 0000000000..0f3d998284 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-email.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..fc81c565ed --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..d0f91eb0a4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..7f026578c5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateMfaAuthenticator( + type: AuthenticatorType.totp, + otp: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..a938f0af68 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMfaChallenge( + challengeId: '', + otp: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..37334ef69a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-name.md b/docs/examples/1.8.x/client-flutter/examples/account/update-name.md new file mode 100644 index 0000000000..303a12351f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-name.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateName( + name: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-password.md b/docs/examples/1.8.x/client-flutter/examples/account/update-password.md new file mode 100644 index 0000000000..835d2383ca --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-password.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePassword( + password: '', + oldPassword: 'password', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-session.md new file mode 100644 index 0000000000..36801792f6 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..f5bbb773d0 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-phone.md b/docs/examples/1.8.x/client-flutter/examples/account/update-phone.md new file mode 100644 index 0000000000..6390d14245 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-phone.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-prefs.md b/docs/examples/1.8.x/client-flutter/examples/account/update-prefs.md new file mode 100644 index 0000000000..81fa362f89 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: {}, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-push-target.md b/docs/examples/1.8.x/client-flutter/examples/account/update-push-target.md new file mode 100644 index 0000000000..c695ea0984 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-push-target.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Target result = await account.updatePushTarget( + targetId: '', + identifier: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-recovery.md b/docs/examples/1.8.x/client-flutter/examples/account/update-recovery.md new file mode 100644 index 0000000000..5ca0239f47 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '', + secret: '', + password: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-session.md b/docs/examples/1.8.x/client-flutter/examples/account/update-session.md new file mode 100644 index 0000000000..4c78ebb187 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-status.md b/docs/examples/1.8.x/client-flutter/examples/account/update-status.md new file mode 100644 index 0000000000..289a3f0a96 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-status.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateStatus(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/update-verification.md new file mode 100644 index 0000000000..15c7ed1928 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-verification.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e97d24ab4f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-browser.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getBrowser( + code: Browser.avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getBrowser( + code: Browser.avantBrowser, + width:0 , // optional + height:0 , // optional + quality:-1 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..9ec42588b4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-credit-card.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getCreditCard( + code: CreditCard.americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getCreditCard( + code: CreditCard.americanExpress, + width:0 , // optional + height:0 , // optional + quality:-1 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..0df5ed0d2a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-favicon.md @@ -0,0 +1,27 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getFavicon( + url: 'https://example.com', +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFavicon( + url:'https://example.com' , +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-flag.md new file mode 100644 index 0000000000..99d43409a0 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-flag.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getFlag( + code: Flag.afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFlag( + code: Flag.afghanistan, + width:0 , // optional + height:0 , // optional + quality:-1 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-image.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-image.md new file mode 100644 index 0000000000..5b9d1b58c1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-image.md @@ -0,0 +1,31 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getImage( + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getImage( + url:'https://example.com' , + width:0 , // optional + height:0 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-initials.md new file mode 100644 index 0000000000..0c5b62a309 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-initials.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getInitials( + name: '', // optional + width: 0, // optional + height: 0, // optional + background: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getInitials( + name:'' , // optional + width:0 , // optional + height:0 , // optional + background:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..d9a533c886 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getQR( + text: '', + size: 1, // optional + margin: 0, // optional + download: false, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getQR( + text:'' , + size:1 , // optional + margin:0 , // optional + download:false , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md new file mode 100644 index 0000000000..4f286fff95 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md new file mode 100644 index 0000000000..29014be0e2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +Databases databases = Databases(client); + +DocumentList result = await databases.createDocuments( + databaseId: '', + collectionId: '', + documents: [], +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/delete-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/delete-document.md new file mode 100644 index 0000000000..3354917c20 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/delete-document.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/get-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/get-document.md new file mode 100644 index 0000000000..f85c1f9b5a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/get-document.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/list-documents.md b/docs/examples/1.8.x/client-flutter/examples/databases/list-documents.md new file mode 100644 index 0000000000..31fec1f522 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/list-documents.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md new file mode 100644 index 0000000000..1f444d875a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md new file mode 100644 index 0000000000..ec3af47c3a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md new file mode 100644 index 0000000000..d2a3d9e00a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '', + body: '', // optional + xasync: false, // optional + path: '', // optional + method: ExecutionMethod.gET, // optional + headers: {}, // optional + scheduledAt: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/get-execution.md b/docs/examples/1.8.x/client-flutter/examples/functions/get-execution.md new file mode 100644 index 0000000000..714933be32 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/functions/get-execution.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '', + executionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/list-executions.md b/docs/examples/1.8.x/client-flutter/examples/functions/list-executions.md new file mode 100644 index 0000000000..232f3250d3 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/functions/list-executions.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/graphql/mutation.md b/docs/examples/1.8.x/client-flutter/examples/graphql/mutation.md new file mode 100644 index 0000000000..60f0c29703 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/graphql/mutation.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/graphql/query.md b/docs/examples/1.8.x/client-flutter/examples/graphql/query.md new file mode 100644 index 0000000000..d90c3432e9 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/graphql/query.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/get.md b/docs/examples/1.8.x/client-flutter/examples/locale/get.md new file mode 100644 index 0000000000..b284699046 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/get.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +Locale result = await locale.get(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-codes.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-codes.md new file mode 100644 index 0000000000..0227471571 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-continents.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-continents.md new file mode 100644 index 0000000000..1098bd1d58 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..7d6571f4ee --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..395f240fd7 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-phones.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-countries.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries.md new file mode 100644 index 0000000000..a322eb2078 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-currencies.md new file mode 100644 index 0000000000..8884bf45b2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-currencies.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-languages.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-languages.md new file mode 100644 index 0000000000..0444d94151 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-languages.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/client-flutter/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-flutter/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..2a278a0481 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '', + subscriberId: '', + targetId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-flutter/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..02c1f61535 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/messaging/delete-subscriber.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '', + subscriberId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md new file mode 100644 index 0000000000..661f6b8b1e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '', + fileId: '', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/delete-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/delete-file.md new file mode 100644 index 0000000000..b2c6a78f75 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/delete-file.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '', + fileId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-download.md new file mode 100644 index 0000000000..5bef06ee7d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-download.md @@ -0,0 +1,31 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFileDownload( + bucketId: '', + fileId: '', + token: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileDownload( + bucketId:'' , + fileId:'' , + token:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..96338bd25a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-preview.md @@ -0,0 +1,53 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFilePreview( + bucketId: '', + fileId: '', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: '', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: '', // optional + output: ImageFormat.jpg, // optional + token: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFilePreview( + bucketId:'' , + fileId:'' , + width:0 , // optional + height:0 , // optional + gravity: ImageGravity.center, // optional + quality:-1 , // optional + borderWidth:0 , // optional + borderColor:'' , // optional + borderRadius:0 , // optional + opacity:0 , // optional + rotation:-360 , // optional + background:'' , // optional + output: ImageFormat.jpg, // optional + token:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-view.md new file mode 100644 index 0000000000..6587f086bd --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-view.md @@ -0,0 +1,31 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFileView( + bucketId: '', + fileId: '', + token: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileView( + bucketId:'' , + fileId:'' , + token:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file.md new file mode 100644 index 0000000000..f4b541ffd1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '', + fileId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/list-files.md b/docs/examples/1.8.x/client-flutter/examples/storage/list-files.md new file mode 100644 index 0000000000..7950005b6a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/list-files.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '', + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md new file mode 100644 index 0000000000..8e598121c1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '', + fileId: '', + name: '', // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md new file mode 100644 index 0000000000..ac9923d813 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.createRow( + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md new file mode 100644 index 0000000000..38c4c7503d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +Tables tables = Tables(client); + +RowList result = await tables.createRows( + databaseId: '', + tableId: '', + rows: [], +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md new file mode 100644 index 0000000000..4187c4766d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +await tables.deleteRow( + databaseId: '', + tableId: '', + rowId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md new file mode 100644 index 0000000000..8d8c52caa6 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +Row result = await tables.getRow( + databaseId: '', + tableId: '', + rowId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md new file mode 100644 index 0000000000..f770bbbd92 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +RowList result = await tables.listRows( + databaseId: '', + tableId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md new file mode 100644 index 0000000000..f43ba5e689 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +Row result = await tables.updateRow( + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md new file mode 100644 index 0000000000..26a872b692 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.upsertRow( + databaseId: '', + tableId: '', + rowId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/create-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/create-membership.md new file mode 100644 index 0000000000..8026521408 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/create.md b/docs/examples/1.8.x/client-flutter/examples/teams/create.md new file mode 100644 index 0000000000..637e216a04 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/create.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '', + name: '', + roles: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/delete-membership.md new file mode 100644 index 0000000000..0f1941d88b --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/delete-membership.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '', + membershipId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/delete.md b/docs/examples/1.8.x/client-flutter/examples/teams/delete.md new file mode 100644 index 0000000000..74c74c9cf1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/delete.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.delete( + teamId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/get-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/get-membership.md new file mode 100644 index 0000000000..468e02cf32 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/get-membership.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '', + membershipId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-flutter/examples/teams/get-prefs.md new file mode 100644 index 0000000000..a22c78869c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/get-prefs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/get.md b/docs/examples/1.8.x/client-flutter/examples/teams/get.md new file mode 100644 index 0000000000..5e8c3463ea --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/get.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-flutter/examples/teams/list-memberships.md new file mode 100644 index 0000000000..374dd49069 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/list-memberships.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '', + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/list.md b/docs/examples/1.8.x/client-flutter/examples/teams/list.md new file mode 100644 index 0000000000..3aa972fb5f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/list.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..1ce3eacb79 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '', + membershipId: '', + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership.md new file mode 100644 index 0000000000..bc2bbae75c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '', + membershipId: '', + roles: [], +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-name.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-name.md new file mode 100644 index 0000000000..8f1794587e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-name.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '', + name: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-prefs.md new file mode 100644 index 0000000000..7b33c8c313 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-prefs.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '', + prefs: {}, +); diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..92c12acee5 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,33 @@ +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-graphql/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..931bb4add0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-email-token.md b/docs/examples/1.8.x/client-graphql/examples/account/create-email-token.md new file mode 100644 index 0000000000..de320b45ed --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +mutation { + accountCreateEmailToken( + userId: "", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a5204f1256 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md @@ -0,0 +1,5 @@ +mutation { + accountCreateJWT { + jwt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..4024a5b3a9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +mutation { + accountCreateMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..6b29292494 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + accountCreateMfaAuthenticator( + type: "totp" + ) { + secret + uri + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..eb5cba127d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,10 @@ +mutation { + accountCreateMfaChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f39b7d080d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountCreateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b56c4eb4e4 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +mutation { + accountCreatePhoneToken( + userId: "", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a4cad59b1a --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-push-target.md b/docs/examples/1.8.x/client-graphql/examples/account/create-push-target.md new file mode 100644 index 0000000000..63802a782e --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-push-target.md @@ -0,0 +1,17 @@ +mutation { + accountCreatePushTarget( + targetId: "", + identifier: "", + providerId: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-recovery.md b/docs/examples/1.8.x/client-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..ad31fd82d7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-session.md b/docs/examples/1.8.x/client-graphql/examples/account/create-session.md new file mode 100644 index 0000000000..f473d14207 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..df50dda529 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-verification.md @@ -0,0 +1,12 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create.md b/docs/examples/1.8.x/client-graphql/examples/account/create.md new file mode 100644 index 0000000000..0d39394a3d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create.md @@ -0,0 +1,40 @@ +mutation { + accountCreate( + userId: "", + email: "email@example.com", + password: "", + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-identity.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..f3c2e2e7b9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..fc5486623a --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteMfaAuthenticator( + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-push-target.md new file mode 100644 index 0000000000..894c0b2e02 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-push-target.md @@ -0,0 +1,7 @@ +mutation { + accountDeletePushTarget( + targetId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-session.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..09aff38fdd --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get-prefs.md b/docs/examples/1.8.x/client-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get-session.md b/docs/examples/1.8.x/client-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get.md b/docs/examples/1.8.x/client-graphql/examples/account/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-identities.md b/docs/examples/1.8.x/client-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-logs.md b/docs/examples/1.8.x/client-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-sessions.md b/docs/examples/1.8.x/client-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-email.md b/docs/examples/1.8.x/client-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..c879e24a43 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-email.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..787c2e0860 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..075bc91d17 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMagicURLSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9cfe9150be --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateMfaAuthenticator( + type: "totp", + otp: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..0bcec2157f --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMfaChallenge( + challengeId: "", + otp: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e706d2b9d7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountUpdateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-name.md b/docs/examples/1.8.x/client-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..8ba2c99d9c --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-name.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateName( + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-password.md b/docs/examples/1.8.x/client-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..f3619a10d2 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-password.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePassword( + password: "", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-session.md new file mode 100644 index 0000000000..199e774ab0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdatePhoneSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..dd62298bb9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdatePhoneVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-phone.md b/docs/examples/1.8.x/client-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..adecb71168 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-phone.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-prefs.md b/docs/examples/1.8.x/client-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..57280247e4 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-prefs.md @@ -0,0 +1,37 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-push-target.md b/docs/examples/1.8.x/client-graphql/examples/account/update-push-target.md new file mode 100644 index 0000000000..3c402cdf12 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-push-target.md @@ -0,0 +1,16 @@ +mutation { + accountUpdatePushTarget( + targetId: "", + identifier: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-recovery.md b/docs/examples/1.8.x/client-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..2d15fdcaa1 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "", + secret: "", + password: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-session.md b/docs/examples/1.8.x/client-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..29a8979872 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-session.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateSession( + sessionId: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-status.md b/docs/examples/1.8.x/client-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..c17f556842 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-status.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..11e63c7da3 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdateVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-image.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/create-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..4f525d6b1f --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/create-document.md @@ -0,0 +1,18 @@ +mutation { + databasesCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md b/docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md new file mode 100644 index 0000000000..8ce79dcbb5 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md @@ -0,0 +1,19 @@ +mutation { + databasesCreateDocuments( + databaseId: "", + collectionId: "", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/delete-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..848371bca0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/get-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/list-documents.md b/docs/examples/1.8.x/client-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/update-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..aea605d9d7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/update-document.md @@ -0,0 +1,18 @@ +mutation { + databasesUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c381fe35a3 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +mutation { + databasesUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..1479aa3bb6 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateExecution( + functionId: "", + body: "", + async: false, + path: "", + method: "GET", + headers: "{}", + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/get-execution.md b/docs/examples/1.8.x/client-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/list-executions.md b/docs/examples/1.8.x/client-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/get.md b/docs/examples/1.8.x/client-graphql/examples/locale/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-codes.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-continents.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-countries.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-languages.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bab53612b7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,27 @@ +mutation { + messagingCreateSubscriber( + topicId: "", + subscriberId: "", + targetId: "" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ededffcaac --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +mutation { + messagingDeleteSubscriber( + topicId: "", + subscriberId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..97e2150c39 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md @@ -0,0 +1,25 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { id }" }, "variables": { "bucketId": "", "fileId": "", "file": null, "permissions": ["read("any")"] } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/delete-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..17ec89931a --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "", + fileId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/list-files.md b/docs/examples/1.8.x/client-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/update-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..b7832048c7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/storage/update-file.md @@ -0,0 +1,20 @@ +mutation { + storageUpdateFile( + bucketId: "", + fileId: "", + name: "", + permissions: ["read("any")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md new file mode 100644 index 0000000000..c88a7f36cf --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesCreateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md new file mode 100644 index 0000000000..a4ae62cfae --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesCreateRows( + databaseId: "", + tableId: "", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md new file mode 100644 index 0000000000..f3a35c1df1 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteRow( + databaseId: "", + tableId: "", + rowId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md new file mode 100644 index 0000000000..8449d8499b --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesUpdateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md new file mode 100644 index 0000000000..480d7651bd --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +mutation { + tablesUpsertRow( + databaseId: "", + tableId: "", + rowId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/create-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..fe741f080d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +mutation { + teamsCreateMembership( + teamId: "", + roles: [], + email: "email@example.com", + userId: "", + phone: "+12065550100", + url: "https://example.com", + name: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/create.md b/docs/examples/1.8.x/client-graphql/examples/teams/create.md new file mode 100644 index 0000000000..1f2a7ab3f2 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/create.md @@ -0,0 +1,16 @@ +mutation { + teamsCreate( + teamId: "", + name: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e391b6f6fa --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "", + membershipId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/delete.md b/docs/examples/1.8.x/client-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..df0d36c5b5 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/get-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/get.md b/docs/examples/1.8.x/client-graphql/examples/teams/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/list.md b/docs/examples/1.8.x/client-graphql/examples/teams/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9b24450a86 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,22 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..1c6a04f078 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembership( + teamId: "", + membershipId: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-name.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..c40543b5cd --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "", + name: "" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..95737e33f9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..4baad33e9d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..217d7873ae --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md new file mode 100644 index 0000000000..b9bdf3bbe2 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..217dc78785 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..413e347aef --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ec243490aa --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..04de25863f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f256be308b --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..84bddb4777 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..cd4ee86aa1 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md new file mode 100644 index 0000000000..d03e5ea4bc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..62bcc48113 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md new file mode 100644 index 0000000000..83211ab9f3 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md b/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md new file mode 100644 index 0000000000..802af82fb7 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-session.md new file mode 100644 index 0000000000..bb3040aef6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md new file mode 100644 index 0000000000..5fdffcba5c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create.md b/docs/examples/1.8.x/client-react-native/examples/account/create.md new file mode 100644 index 0000000000..eb3d04ac54 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md new file mode 100644 index 0000000000..df492a528d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..093ba4d5a2 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md new file mode 100644 index 0000000000..a926ede9c6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md new file mode 100644 index 0000000000..134a2caa56 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-sessions.md new file mode 100644 index 0000000000..830eb273a8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-react-native/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c660a17ab8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get-prefs.md b/docs/examples/1.8.x/client-react-native/examples/account/get-prefs.md new file mode 100644 index 0000000000..b26a7b09f0 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get-session.md b/docs/examples/1.8.x/client-react-native/examples/account/get-session.md new file mode 100644 index 0000000000..1db05d5c26 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get.md b/docs/examples/1.8.x/client-react-native/examples/account/get.md new file mode 100644 index 0000000000..21d2401601 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md b/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md new file mode 100644 index 0000000000..239dbbf21f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md b/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md new file mode 100644 index 0000000000..9cf441453c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-react-native/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..51b76c90e4 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-sessions.md b/docs/examples/1.8.x/client-react-native/examples/account/list-sessions.md new file mode 100644 index 0000000000..68232be292 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-email.md b/docs/examples/1.8.x/client-react-native/examples/account/update-email.md new file mode 100644 index 0000000000..4bbe0b03e7 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..ebbfc0c8cd --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c5e6b61395 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..07a798e7a6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..b93e0bf520 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..2ed9bb0204 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-name.md b/docs/examples/1.8.x/client-react-native/examples/account/update-name.md new file mode 100644 index 0000000000..adbbcab5be --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-password.md b/docs/examples/1.8.x/client-react-native/examples/account/update-password.md new file mode 100644 index 0000000000..3bde58e68a --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md new file mode 100644 index 0000000000..c9c82696fc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..0ef7e53e66 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md new file mode 100644 index 0000000000..bf8aae2a3d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md b/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md new file mode 100644 index 0000000000..01d4fd6878 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md new file mode 100644 index 0000000000..d88e22e04d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md b/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md new file mode 100644 index 0000000000..9a5ef04f3a --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-session.md new file mode 100644 index 0000000000..0c8a9e5df3 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-status.md b/docs/examples/1.8.x/client-react-native/examples/account/update-status.md new file mode 100644 index 0000000000..8d3a2b0698 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md new file mode 100644 index 0000000000..c956d5fcd6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md new file mode 100644 index 0000000000..433cbe5999 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..bbd0007fe0 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..ff48c76ffc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md new file mode 100644 index 0000000000..4e6070d190 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md new file mode 100644 index 0000000000..006155effd --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a87a643450 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..177759d9ef --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md new file mode 100644 index 0000000000..ec768fcfaf --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md new file mode 100644 index 0000000000..c0a8f1d03c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md new file mode 100644 index 0000000000..9136107a3c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md new file mode 100644 index 0000000000..9993e2c941 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md b/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md new file mode 100644 index 0000000000..b2f377e53c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md new file mode 100644 index 0000000000..7676ee109b --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md new file mode 100644 index 0000000000..56d3af23ae --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md new file mode 100644 index 0000000000..72c71f7767 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md new file mode 100644 index 0000000000..848747ea2f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md b/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md new file mode 100644 index 0000000000..346f8c7ea8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md b/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md new file mode 100644 index 0000000000..3292a5dad2 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/graphql/query.md b/docs/examples/1.8.x/client-react-native/examples/graphql/query.md new file mode 100644 index 0000000000..a00c517a46 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/get.md b/docs/examples/1.8.x/client-react-native/examples/locale/get.md new file mode 100644 index 0000000000..34c1672c53 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-codes.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-codes.md new file mode 100644 index 0000000000..29cec5a5cf --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-continents.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-continents.md new file mode 100644 index 0000000000..c98ba19af3 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..7fb71a548d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..612debc5ab --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-countries.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries.md new file mode 100644 index 0000000000..8b1f636fa6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-currencies.md new file mode 100644 index 0000000000..4b96a5fdbc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-languages.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-languages.md new file mode 100644 index 0000000000..54166afb1e --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..c950e90bae --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '', // topicId + '', // subscriberId + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..5004b59cac --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '', // topicId + '' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md new file mode 100644 index 0000000000..efbfd607c1 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '', // bucketId + '', // fileId + await pickSingle(), // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md new file mode 100644 index 0000000000..1a436ac8a8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e21bad67eb --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..6f116c5df6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '', // bucketId + '', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9b229f6a54 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md new file mode 100644 index 0000000000..6d358adabd --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md b/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md new file mode 100644 index 0000000000..19099b1288 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '', // bucketId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md new file mode 100644 index 0000000000..d4ed68a337 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '', // bucketId + '', // fileId + '', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md new file mode 100644 index 0000000000..75de1c2a39 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md new file mode 100644 index 0000000000..165aa4cb71 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const tables = new Tables(client); + +const result = await tables.createRows( + '', // databaseId + '', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md new file mode 100644 index 0000000000..9746f85ea0 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md new file mode 100644 index 0000000000..b9434e3957 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '', // databaseId + '', // tableId + '', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md new file mode 100644 index 0000000000..75f81a1435 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '', // databaseId + '', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md new file mode 100644 index 0000000000..7bb36dd254 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f176425abb --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md new file mode 100644 index 0000000000..680fdb2ad8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '', // teamId + [], // roles + 'email@example.com', // email (optional) + '', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/create.md b/docs/examples/1.8.x/client-react-native/examples/teams/create.md new file mode 100644 index 0000000000..51aaee358e --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '', // teamId + '', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md new file mode 100644 index 0000000000..37bdc7f87f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/delete.md b/docs/examples/1.8.x/client-react-native/examples/teams/delete.md new file mode 100644 index 0000000000..fe67eaffd1 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md new file mode 100644 index 0000000000..2b253c8b51 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md new file mode 100644 index 0000000000..943ed1a181 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get.md b/docs/examples/1.8.x/client-react-native/examples/teams/get.md new file mode 100644 index 0000000000..9267b57e2f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md new file mode 100644 index 0000000000..4444bcd664 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '', // teamId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/list.md b/docs/examples/1.8.x/client-react-native/examples/teams/list.md new file mode 100644 index 0000000000..779538a70a --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c8edbf08c7 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '', // teamId + '', // membershipId + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md new file mode 100644 index 0000000000..347cbdd095 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '', // teamId + '', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md new file mode 100644 index 0000000000..0ab4aa1c84 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '', // teamId + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md new file mode 100644 index 0000000000..fda16a05db --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..2079b045d1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,6 @@ +POST /v1/account/sessions/anonymous HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..8aee0e5b15 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md new file mode 100644 index 0000000000..98c5c9b454 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md @@ -0,0 +1,11 @@ +POST /v1/account/tokens/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a8da4695c3 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md @@ -0,0 +1,6 @@ +POST /v1/account/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..a3db43516a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,12 @@ +POST /v1/account/tokens/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..8d6b52b877 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..9a84c0ef69 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,9 @@ +POST /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "factor": "email" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..797824d5d7 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..293170b490 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md @@ -0,0 +1,4 @@ +GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..dd1dd3ec5e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md @@ -0,0 +1,4 @@ +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md new file mode 100644 index 0000000000..eef1021d9e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md @@ -0,0 +1,10 @@ +POST /v1/account/tokens/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "phone": "+12065550100" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..d161e580ff --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md @@ -0,0 +1,8 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md new file mode 100644 index 0000000000..5844ccc19e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md @@ -0,0 +1,12 @@ +POST /v1/account/targets/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + +{ + "targetId": "", + "identifier": "", + "providerId": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..c195b96a5e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +POST /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-session.md new file mode 100644 index 0000000000..18e3b1acdd --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..1185d3a875 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md @@ -0,0 +1,11 @@ +POST /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create.md b/docs/examples/1.8.x/client-rest/examples/account/create.md new file mode 100644 index 0000000000..f546c07de5 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create.md @@ -0,0 +1,12 @@ +POST /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "password": , + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..edb036a593 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md @@ -0,0 +1,8 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..de58948195 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md new file mode 100644 index 0000000000..fdfc75a41b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md @@ -0,0 +1,7 @@ +DELETE /v1/account/targets/{targetId}/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..9454a84913 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..97931c12e5 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..81edee5234 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..13a0b74d8f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-session.md b/docs/examples/1.8.x/client-rest/examples/account/get-session.md new file mode 100644 index 0000000000..9417755b04 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get-session.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/get.md b/docs/examples/1.8.x/client-rest/examples/account/get.md new file mode 100644 index 0000000000..023a6d116f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get.md @@ -0,0 +1,6 @@ +GET /v1/account HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..65edceb8d6 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md @@ -0,0 +1,6 @@ +GET /v1/account/identities HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..71e2e138ef --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md @@ -0,0 +1,6 @@ +GET /v1/account/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..217ec6cb30 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..7bff23f25b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-email.md b/docs/examples/1.8.x/client-rest/examples/account/update-email.md new file mode 100644 index 0000000000..fc3baaf4a4 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-email.md @@ -0,0 +1,12 @@ +PATCH /v1/account/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..803c47a857 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +PATCH /v1/account/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "mfa": false +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3238322e0f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9d3e5dceea --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,11 @@ +PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "otp": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ddc27ae334 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +PUT /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "challengeId": "", + "otp": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e4ab8abb3b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +PATCH /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-name.md b/docs/examples/1.8.x/client-rest/examples/account/update-name.md new file mode 100644 index 0000000000..f2f7caa204 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-name.md @@ -0,0 +1,11 @@ +PATCH /v1/account/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-password.md b/docs/examples/1.8.x/client-rest/examples/account/update-password.md new file mode 100644 index 0000000000..4f69b9ab3f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-password.md @@ -0,0 +1,12 @@ +PATCH /v1/account/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f1bc27d201 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..ee6f5a68ff --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..bbe602a181 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md @@ -0,0 +1,12 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..aeabc2b68f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md new file mode 100644 index 0000000000..2e42a2d67f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md @@ -0,0 +1,10 @@ +PUT /v1/account/targets/{targetId}/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + +{ + "identifier": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..054aacc8ed --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "", + "password": +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-session.md new file mode 100644 index 0000000000..9b2ba0e4a7 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-session.md @@ -0,0 +1,8 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-status.md b/docs/examples/1.8.x/client-rest/examples/account/update-status.md new file mode 100644 index 0000000000..8a3e01db0b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-status.md @@ -0,0 +1,8 @@ +PATCH /v1/account/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..0c5ed8b55d --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e5f6f22ab5 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md @@ -0,0 +1,6 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..ab513115f8 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,6 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..837dba633c --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md @@ -0,0 +1,6 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..d0c92d7c02 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md @@ -0,0 +1,6 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..2f80018f20 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md @@ -0,0 +1,6 @@ +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..f3879b5d52 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md @@ -0,0 +1,6 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..263c54742c --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md @@ -0,0 +1,6 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..3126197555 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "documentId": "", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/create-documents.md b/docs/examples/1.8.x/client-rest/examples/databases/create-documents.md new file mode 100644 index 0000000000..e4d2b956e0 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/create-documents.md @@ -0,0 +1,11 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "documents": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..6b86aba853 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..a32db40087 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..22ca529e89 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..945b957c6e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md new file mode 100644 index 0000000000..7cfa380a40 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md @@ -0,0 +1,8 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..fec92ddab0 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md @@ -0,0 +1,16 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "body": "", + "async": false, + "path": "", + "method": "GET", + "headers": {}, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..7df2f3acbe --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md @@ -0,0 +1,6 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..b2ab0e05d1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md @@ -0,0 +1,6 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..db3b1c0c78 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/query.md b/docs/examples/1.8.x/client-rest/examples/graphql/query.md new file mode 100644 index 0000000000..8fc41efcfe --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/graphql/query.md @@ -0,0 +1,12 @@ +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/client-rest/examples/locale/get.md b/docs/examples/1.8.x/client-rest/examples/locale/get.md new file mode 100644 index 0000000000..0d67644583 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/get.md @@ -0,0 +1,6 @@ +GET /v1/locale HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..f362c5987e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md @@ -0,0 +1,6 @@ +GET /v1/locale/codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..93db4fb302 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md @@ -0,0 +1,6 @@ +GET /v1/locale/continents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..09eba6168f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,6 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..94ef0bb943 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,6 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..dc8289980a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md @@ -0,0 +1,6 @@ +GET /v1/locale/countries HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..9a3af20c94 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md @@ -0,0 +1,6 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..7d90c8b40a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md @@ -0,0 +1,6 @@ +GET /v1/locale/languages HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..94e98c4438 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,12 @@ +POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-JWT: +X-Appwrite-Session: + +{ + "subscriberId": "", + "targetId": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..e5ac0830a3 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-JWT: +X-Appwrite-Session: + diff --git a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..f044b577b2 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md @@ -0,0 +1,26 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..8d074341fe --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..58c9c6d276 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ff24de4ec4 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9c95a2b48f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..ffb3703fe1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..d1258b97de --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..210433622b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md @@ -0,0 +1,12 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-row.md b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md new file mode 100644 index 0000000000..c4166b8b80 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "rowId": "", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md new file mode 100644 index 0000000000..0935afd11e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md @@ -0,0 +1,11 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md new file mode 100644 index 0000000000..954303d17a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/tables/get-row.md b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md new file mode 100644 index 0000000000..fc09601df7 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md new file mode 100644 index 0000000000..de214e7cea --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/tables/update-row.md b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md new file mode 100644 index 0000000000..f09f639e60 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md new file mode 100644 index 0000000000..60528077ef --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md @@ -0,0 +1,8 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..83e4803502 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "userId": "", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create.md b/docs/examples/1.8.x/client-rest/examples/teams/create.md new file mode 100644 index 0000000000..c80b2bda8e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/create.md @@ -0,0 +1,13 @@ +POST /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "teamId": "", + "name": "", + "roles": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..0fc17e11ee --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete.md b/docs/examples/1.8.x/client-rest/examples/teams/delete.md new file mode 100644 index 0000000000..ad614b17d1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..dbe034f34b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ddb863181d --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get.md b/docs/examples/1.8.x/client-rest/examples/teams/get.md new file mode 100644 index 0000000000..730d23a03b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/get.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..82a9f82c33 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list.md b/docs/examples/1.8.x/client-rest/examples/teams/list.md new file mode 100644 index 0000000000..00a419269a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/list.md @@ -0,0 +1,6 @@ +GET /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9d828118f0 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..3768499d16 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md @@ -0,0 +1,11 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "roles": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..ec381348e8 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..1db6300350 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/client-web/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..42279c0312 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..3438ffbe54 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-email-token.md b/docs/examples/1.8.x/client-web/examples/account/create-email-token.md new file mode 100644 index 0000000000..e7cab7c360 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..ff17d60661 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..ba87bd9a3f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..510481511d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..e9f6f08b48 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2cc744175e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..caad309ffd --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..5f0aab36d8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md new file mode 100644 index 0000000000..481e57d353 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..00373a3dd4 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-push-target.md b/docs/examples/1.8.x/client-web/examples/account/create-push-target.md new file mode 100644 index 0000000000..c987e3d2a8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-recovery.md b/docs/examples/1.8.x/client-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..f0a400d86d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-session.md b/docs/examples/1.8.x/client-web/examples/account/create-session.md new file mode 100644 index 0000000000..b6d7ef8bbb --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-verification.md b/docs/examples/1.8.x/client-web/examples/account/create-verification.md new file mode 100644 index 0000000000..4a3b3144b6 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create.md b/docs/examples/1.8.x/client-web/examples/account/create.md new file mode 100644 index 0000000000..bf2dbec02a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-identity.md b/docs/examples/1.8.x/client-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..f34baaaf5e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..d11351442c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md new file mode 100644 index 0000000000..79bb06ed5d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-session.md b/docs/examples/1.8.x/client-web/examples/account/delete-session.md new file mode 100644 index 0000000000..4d27221d85 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..c0fdf13924 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..850488b0c8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get-prefs.md b/docs/examples/1.8.x/client-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..f283832896 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get-session.md b/docs/examples/1.8.x/client-web/examples/account/get-session.md new file mode 100644 index 0000000000..29af11052e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get.md b/docs/examples/1.8.x/client-web/examples/account/get.md new file mode 100644 index 0000000000..ea605914ce --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-identities.md b/docs/examples/1.8.x/client-web/examples/account/list-identities.md new file mode 100644 index 0000000000..54c569b836 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-logs.md b/docs/examples/1.8.x/client-web/examples/account/list-logs.md new file mode 100644 index 0000000000..17c214f949 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-web/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..c9fa7da1bc --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-sessions.md b/docs/examples/1.8.x/client-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..453e606517 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-email.md b/docs/examples/1.8.x/client-web/examples/account/update-email.md new file mode 100644 index 0000000000..9e02fc9416 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..58b6a061b1 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..47501c528f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..74eedd8dc7 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..01a09dd354 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..24ff10b1e4 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-name.md b/docs/examples/1.8.x/client-web/examples/account/update-name.md new file mode 100644 index 0000000000..d6a6946795 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-password.md b/docs/examples/1.8.x/client-web/examples/account/update-password.md new file mode 100644 index 0000000000..575779e35c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..092205ec6a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..1b85178e76 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone.md b/docs/examples/1.8.x/client-web/examples/account/update-phone.md new file mode 100644 index 0000000000..0c5ff216d8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-prefs.md b/docs/examples/1.8.x/client-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..b9e88eac28 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-push-target.md b/docs/examples/1.8.x/client-web/examples/account/update-push-target.md new file mode 100644 index 0000000000..3475a22ba9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-recovery.md b/docs/examples/1.8.x/client-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..328e50ea4f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-session.md b/docs/examples/1.8.x/client-web/examples/account/update-session.md new file mode 100644 index 0000000000..4ccc8295d9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-status.md b/docs/examples/1.8.x/client-web/examples/account/update-status.md new file mode 100644 index 0000000000..932f167033 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-verification.md b/docs/examples/1.8.x/client-web/examples/account/update-verification.md new file mode 100644 index 0000000000..6d15aeec2e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..08512d1dc7 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..fb631a4e3e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..85317f1383 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..bfbc6c2865 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-image.md b/docs/examples/1.8.x/client-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..36f88ecb52 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..321c448807 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..cbbabbc2c8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-document.md b/docs/examples/1.8.x/client-web/examples/databases/create-document.md new file mode 100644 index 0000000000..401a67488c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/create-document.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-documents.md b/docs/examples/1.8.x/client-web/examples/databases/create-documents.md new file mode 100644 index 0000000000..85b1c4cb0a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/delete-document.md b/docs/examples/1.8.x/client-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..c9a1e9f759 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/get-document.md b/docs/examples/1.8.x/client-web/examples/databases/get-document.md new file mode 100644 index 0000000000..a2836fc6ef --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/list-documents.md b/docs/examples/1.8.x/client-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..d00ac56390 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/update-document.md b/docs/examples/1.8.x/client-web/examples/databases/update-document.md new file mode 100644 index 0000000000..c0e06fce40 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md new file mode 100644 index 0000000000..a581396da8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..8f07523b2b --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/get-execution.md b/docs/examples/1.8.x/client-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..9b88f81f6c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/list-executions.md b/docs/examples/1.8.x/client-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..9ec506346c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/graphql/mutation.md b/docs/examples/1.8.x/client-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..0e7466ac13 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/graphql/query.md b/docs/examples/1.8.x/client-web/examples/graphql/query.md new file mode 100644 index 0000000000..f9cd9b740f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/get.md b/docs/examples/1.8.x/client-web/examples/locale/get.md new file mode 100644 index 0000000000..bdd74722f4 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-codes.md b/docs/examples/1.8.x/client-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..547bb056c0 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-continents.md b/docs/examples/1.8.x/client-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..217ffc116c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..515a3040ab --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..72a6a31d08 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-countries.md b/docs/examples/1.8.x/client-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..a127521f36 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e6ff0e1fce --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-languages.md b/docs/examples/1.8.x/client-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..03b4e7d2c1 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..254870985d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '', // topicId + '', // subscriberId + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..3d5d0a4b42 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '', // topicId + '' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/create-file.md b/docs/examples/1.8.x/client-web/examples/storage/create-file.md new file mode 100644 index 0000000000..20a42206a2 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '', // bucketId + '', // fileId + document.getElementById('uploader').files[0], // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/delete-file.md b/docs/examples/1.8.x/client-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..373cdc03fc --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..3ebb8f8f71 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ffc64c9f3a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '', // bucketId + '', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..add5a6fba5 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file.md b/docs/examples/1.8.x/client-web/examples/storage/get-file.md new file mode 100644 index 0000000000..10bd9fb775 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/list-files.md b/docs/examples/1.8.x/client-web/examples/storage/list-files.md new file mode 100644 index 0000000000..f2c3ccb2b8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '', // bucketId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/update-file.md b/docs/examples/1.8.x/client-web/examples/storage/update-file.md new file mode 100644 index 0000000000..1432b85099 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '', // bucketId + '', // fileId + '', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-row.md b/docs/examples/1.8.x/client-web/examples/tables/create-row.md new file mode 100644 index 0000000000..f7b54d1894 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-rows.md b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md new file mode 100644 index 0000000000..79d7d3f311 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const tables = new Tables(client); + +const result = await tables.createRows( + '', // databaseId + '', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/delete-row.md b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md new file mode 100644 index 0000000000..5c6c4b96d9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/get-row.md b/docs/examples/1.8.x/client-web/examples/tables/get-row.md new file mode 100644 index 0000000000..708b3d96cc --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '', // databaseId + '', // tableId + '', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/list-rows.md b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md new file mode 100644 index 0000000000..f82d358f0d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '', // databaseId + '', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/update-row.md b/docs/examples/1.8.x/client-web/examples/tables/update-row.md new file mode 100644 index 0000000000..0e0c5a012e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f111fefd71 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/create-membership.md b/docs/examples/1.8.x/client-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..8802e25af9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '', // teamId + [], // roles + 'email@example.com', // email (optional) + '', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/create.md b/docs/examples/1.8.x/client-web/examples/teams/create.md new file mode 100644 index 0000000000..b23f2201ac --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '', // teamId + '', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..2f360c3547 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/delete.md b/docs/examples/1.8.x/client-web/examples/teams/delete.md new file mode 100644 index 0000000000..5fd7f5d858 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get-membership.md b/docs/examples/1.8.x/client-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..cd253fd6ef --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..a7f346f11f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get.md b/docs/examples/1.8.x/client-web/examples/teams/get.md new file mode 100644 index 0000000000..539bdcf051 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..e8cc39b5d8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '', // teamId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/list.md b/docs/examples/1.8.x/client-web/examples/teams/list.md new file mode 100644 index 0000000000..4ca13ce8dd --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..89cc13cac2 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '', // teamId + '', // membershipId + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-membership.md b/docs/examples/1.8.x/client-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..fd6fffffcb --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '', // teamId + '', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-name.md b/docs/examples/1.8.x/client-web/examples/teams/update-name.md new file mode 100644 index 0000000000..d91939ff73 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '', // teamId + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..d7d4c36759 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/console-cli/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..a7eb9c5be3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-anonymous-session.md @@ -0,0 +1 @@ +appwrite account createAnonymousSession diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-email-password-session.md b/docs/examples/1.8.x/console-cli/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..951293b4b2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-email-password-session.md @@ -0,0 +1,3 @@ +appwrite account createEmailPasswordSession \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-email-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-email-token.md new file mode 100644 index 0000000000..0aaf2476c9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-email-token.md @@ -0,0 +1,4 @@ +appwrite account createEmailToken \ + --userId \ + --email email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md b/docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..7b5337993d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md @@ -0,0 +1 @@ +appwrite account createJWT diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..69203b085d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,5 @@ +appwrite account createMagicURLToken \ + --userId \ + --email email@example.com \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..7634217700 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account createMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..8696be7ec1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-challenge.md @@ -0,0 +1,2 @@ +appwrite account createMfaChallenge \ + --factor email diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..0ef25446fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account createMfaRecoveryCodes diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..9159b8f25f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Session \ + --provider amazon \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..b36f350d99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Token \ + --provider amazon \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-phone-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-phone-token.md new file mode 100644 index 0000000000..23f7f19cac --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-phone-token.md @@ -0,0 +1,3 @@ +appwrite account createPhoneToken \ + --userId \ + --phone +12065550100 diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-phone-verification.md b/docs/examples/1.8.x/console-cli/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..3c4402ba1f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-phone-verification.md @@ -0,0 +1 @@ +appwrite account createPhoneVerification diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-push-target.md b/docs/examples/1.8.x/console-cli/examples/account/create-push-target.md new file mode 100644 index 0000000000..41c380b288 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-push-target.md @@ -0,0 +1,4 @@ +appwrite account createPushTarget \ + --targetId \ + --identifier \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-recovery.md b/docs/examples/1.8.x/console-cli/examples/account/create-recovery.md new file mode 100644 index 0000000000..ea8c145abb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-recovery.md @@ -0,0 +1,3 @@ +appwrite account createRecovery \ + --email email@example.com \ + --url https://example.com diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-session.md b/docs/examples/1.8.x/console-cli/examples/account/create-session.md new file mode 100644 index 0000000000..426713ef50 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-session.md @@ -0,0 +1,3 @@ +appwrite account createSession \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-verification.md b/docs/examples/1.8.x/console-cli/examples/account/create-verification.md new file mode 100644 index 0000000000..402038b4b6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-verification.md @@ -0,0 +1,2 @@ +appwrite account createVerification \ + --url https://example.com diff --git a/docs/examples/1.8.x/console-cli/examples/account/create.md b/docs/examples/1.8.x/console-cli/examples/account/create.md new file mode 100644 index 0000000000..09686a2454 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create.md @@ -0,0 +1,5 @@ +appwrite account create \ + --userId \ + --email email@example.com \ + --password '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-identity.md b/docs/examples/1.8.x/console-cli/examples/account/delete-identity.md new file mode 100644 index 0000000000..acd8511dfb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-identity.md @@ -0,0 +1,2 @@ +appwrite account deleteIdentity \ + --identityId diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..d4664855b5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account deleteMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-push-target.md b/docs/examples/1.8.x/console-cli/examples/account/delete-push-target.md new file mode 100644 index 0000000000..610ea232d8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-push-target.md @@ -0,0 +1,2 @@ +appwrite account deletePushTarget \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-session.md b/docs/examples/1.8.x/console-cli/examples/account/delete-session.md new file mode 100644 index 0000000000..9774552408 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-session.md @@ -0,0 +1,2 @@ +appwrite account deleteSession \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-sessions.md b/docs/examples/1.8.x/console-cli/examples/account/delete-sessions.md new file mode 100644 index 0000000000..dd11877a5d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-sessions.md @@ -0,0 +1 @@ +appwrite account deleteSessions diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete.md b/docs/examples/1.8.x/console-cli/examples/account/delete.md new file mode 100644 index 0000000000..dac412f7c2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete.md @@ -0,0 +1 @@ +appwrite account delete diff --git a/docs/examples/1.8.x/console-cli/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0e61d658de --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account getMfaRecoveryCodes diff --git a/docs/examples/1.8.x/console-cli/examples/account/get-prefs.md b/docs/examples/1.8.x/console-cli/examples/account/get-prefs.md new file mode 100644 index 0000000000..6569925d99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get-prefs.md @@ -0,0 +1 @@ +appwrite account getPrefs diff --git a/docs/examples/1.8.x/console-cli/examples/account/get-session.md b/docs/examples/1.8.x/console-cli/examples/account/get-session.md new file mode 100644 index 0000000000..120dc8277f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get-session.md @@ -0,0 +1,2 @@ +appwrite account getSession \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/account/get.md b/docs/examples/1.8.x/console-cli/examples/account/get.md new file mode 100644 index 0000000000..c8b46e34c7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get.md @@ -0,0 +1 @@ +appwrite account get diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-identities.md b/docs/examples/1.8.x/console-cli/examples/account/list-identities.md new file mode 100644 index 0000000000..877b443ea8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-identities.md @@ -0,0 +1,2 @@ +appwrite account listIdentities \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-logs.md b/docs/examples/1.8.x/console-cli/examples/account/list-logs.md new file mode 100644 index 0000000000..e92f49063a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-logs.md @@ -0,0 +1,2 @@ +appwrite account listLogs \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/console-cli/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..a29f287d24 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-mfa-factors.md @@ -0,0 +1 @@ +appwrite account listMfaFactors diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-sessions.md b/docs/examples/1.8.x/console-cli/examples/account/list-sessions.md new file mode 100644 index 0000000000..87cbab0f66 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-sessions.md @@ -0,0 +1 @@ +appwrite account listSessions diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-email.md b/docs/examples/1.8.x/console-cli/examples/account/update-email.md new file mode 100644 index 0000000000..81938ff3a9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-email.md @@ -0,0 +1,3 @@ +appwrite account updateEmail \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md b/docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..f714d4dbe9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md @@ -0,0 +1,2 @@ +appwrite account updateMFA \ + --mfa false diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..919bd70a30 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,3 @@ +appwrite account updateMagicURLSession \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b51796a79e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite account updateMfaAuthenticator \ + --type totp \ + --otp diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..37e09ef4e8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-challenge.md @@ -0,0 +1,3 @@ +appwrite account updateMfaChallenge \ + --challengeId \ + --otp diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a129ca6f98 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account updateMfaRecoveryCodes diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-name.md b/docs/examples/1.8.x/console-cli/examples/account/update-name.md new file mode 100644 index 0000000000..6f3b5977f4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-name.md @@ -0,0 +1,2 @@ +appwrite account updateName \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-password.md b/docs/examples/1.8.x/console-cli/examples/account/update-password.md new file mode 100644 index 0000000000..340baec562 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-password.md @@ -0,0 +1,3 @@ +appwrite account updatePassword \ + --password '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-phone-session.md b/docs/examples/1.8.x/console-cli/examples/account/update-phone-session.md new file mode 100644 index 0000000000..d70f33fab5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-phone-session.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneSession \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-phone-verification.md b/docs/examples/1.8.x/console-cli/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..cef2b5a40d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneVerification \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-phone.md b/docs/examples/1.8.x/console-cli/examples/account/update-phone.md new file mode 100644 index 0000000000..93a619a801 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-phone.md @@ -0,0 +1,3 @@ +appwrite account updatePhone \ + --phone +12065550100 \ + --password password diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-prefs.md b/docs/examples/1.8.x/console-cli/examples/account/update-prefs.md new file mode 100644 index 0000000000..568ac66e48 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-prefs.md @@ -0,0 +1,2 @@ +appwrite account updatePrefs \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-push-target.md b/docs/examples/1.8.x/console-cli/examples/account/update-push-target.md new file mode 100644 index 0000000000..f3aa1a906a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-push-target.md @@ -0,0 +1,3 @@ +appwrite account updatePushTarget \ + --targetId \ + --identifier diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-recovery.md b/docs/examples/1.8.x/console-cli/examples/account/update-recovery.md new file mode 100644 index 0000000000..903a99cc99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-recovery.md @@ -0,0 +1,4 @@ +appwrite account updateRecovery \ + --userId \ + --secret \ + --password '' diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-session.md b/docs/examples/1.8.x/console-cli/examples/account/update-session.md new file mode 100644 index 0000000000..5fb6a2e8d5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-session.md @@ -0,0 +1,2 @@ +appwrite account updateSession \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-status.md b/docs/examples/1.8.x/console-cli/examples/account/update-status.md new file mode 100644 index 0000000000..8886dbbc6a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-status.md @@ -0,0 +1 @@ +appwrite account updateStatus diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-verification.md b/docs/examples/1.8.x/console-cli/examples/account/update-verification.md new file mode 100644 index 0000000000..afdfaa8372 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-verification.md @@ -0,0 +1,3 @@ +appwrite account updateVerification \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-browser.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-browser.md new file mode 100644 index 0000000000..6b4f0b8007 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-browser.md @@ -0,0 +1,5 @@ +appwrite avatars getBrowser \ + --code aa \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..365568ba19 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-credit-card.md @@ -0,0 +1,5 @@ +appwrite avatars getCreditCard \ + --code amex \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-favicon.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c658f1a483 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-favicon.md @@ -0,0 +1,2 @@ +appwrite avatars getFavicon \ + --url https://example.com diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-flag.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-flag.md new file mode 100644 index 0000000000..9f11fef840 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-flag.md @@ -0,0 +1,5 @@ +appwrite avatars getFlag \ + --code af \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-image.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-image.md new file mode 100644 index 0000000000..7df150610c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-image.md @@ -0,0 +1,4 @@ +appwrite avatars getImage \ + --url https://example.com \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-initials.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-initials.md new file mode 100644 index 0000000000..b0b3da71c9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-initials.md @@ -0,0 +1,5 @@ +appwrite avatars getInitials \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..01e5085732 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md @@ -0,0 +1,5 @@ +appwrite avatars getQR \ + --text \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/console/get-resource.md b/docs/examples/1.8.x/console-cli/examples/console/get-resource.md new file mode 100644 index 0000000000..3e55163966 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/console/get-resource.md @@ -0,0 +1,3 @@ +appwrite console getResource \ + --value \ + --type rules diff --git a/docs/examples/1.8.x/console-cli/examples/console/variables.md b/docs/examples/1.8.x/console-cli/examples/console/variables.md new file mode 100644 index 0000000000..1c67cf5ad8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/console/variables.md @@ -0,0 +1 @@ +appwrite console variables diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..6babbfb5af --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/create-collection.md new file mode 100644 index 0000000000..d97c424d16 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-collection.md @@ -0,0 +1,7 @@ +appwrite databases createCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..f6aaf54fa2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-document.md b/docs/examples/1.8.x/console-cli/examples/databases/create-document.md new file mode 100644 index 0000000000..513cfc4f33 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-document.md @@ -0,0 +1,6 @@ +appwrite databases createDocument \ + --databaseId \ + --collectionId \ + --documentId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/create-documents.md new file mode 100644 index 0000000000..e9e65b5c3c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-documents.md @@ -0,0 +1,4 @@ +appwrite databases createDocuments \ + --databaseId \ + --collectionId \ + --documents one two three diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..5c23f940de --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..5d3c614410 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases createEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..5a6ef4e4ef --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-index.md b/docs/examples/1.8.x/console-cli/examples/databases/create-index.md new file mode 100644 index 0000000000..2dc95ea921 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-index.md @@ -0,0 +1,8 @@ +appwrite databases createIndex \ + --databaseId \ + --collectionId \ + --key '' \ + --type key \ + --attributes one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..791f3770c9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..4f39d84bab --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..c7d8ae568a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-relationship-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createRelationshipAttribute \ + --databaseId \ + --collectionId \ + --relatedCollectionId \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..37b1db644a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-string-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..4406ed7879 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create.md b/docs/examples/1.8.x/console-cli/examples/databases/create.md new file mode 100644 index 0000000000..9e7523974f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create.md @@ -0,0 +1,4 @@ +appwrite databases create \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..e6607ea833 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/decrement-document-attribute.md @@ -0,0 +1,7 @@ +appwrite databases decrementDocumentAttribute \ + --databaseId \ + --collectionId \ + --documentId \ + --attribute '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..88e7df985f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-attribute.md @@ -0,0 +1,4 @@ +appwrite databases deleteAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-collection.md new file mode 100644 index 0000000000..0db185a7d7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-collection.md @@ -0,0 +1,3 @@ +appwrite databases deleteCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-document.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-document.md new file mode 100644 index 0000000000..3a96d35798 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-document.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocument \ + --databaseId \ + --collectionId \ + --documentId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-documents.md new file mode 100644 index 0000000000..6f3463cbf9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-documents.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocuments \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-index.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-index.md new file mode 100644 index 0000000000..56485e7a78 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-index.md @@ -0,0 +1,4 @@ +appwrite databases deleteIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete.md b/docs/examples/1.8.x/console-cli/examples/databases/delete.md new file mode 100644 index 0000000000..a24a3a04d3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete.md @@ -0,0 +1,2 @@ +appwrite databases delete \ + --databaseId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/get-attribute.md new file mode 100644 index 0000000000..821698011f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-attribute.md @@ -0,0 +1,4 @@ +appwrite databases getAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-collection-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..b57e6c92a9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-collection-usage.md @@ -0,0 +1,4 @@ +appwrite databases getCollectionUsage \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/get-collection.md new file mode 100644 index 0000000000..e763b5bbfb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-collection.md @@ -0,0 +1,3 @@ +appwrite databases getCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..1001e9cd11 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md @@ -0,0 +1,3 @@ +appwrite databases getDatabaseUsage \ + --databaseId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-document.md b/docs/examples/1.8.x/console-cli/examples/databases/get-document.md new file mode 100644 index 0000000000..35d9615503 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-document.md @@ -0,0 +1,5 @@ +appwrite databases getDocument \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-index.md b/docs/examples/1.8.x/console-cli/examples/databases/get-index.md new file mode 100644 index 0000000000..0071834a8c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-index.md @@ -0,0 +1,4 @@ +appwrite databases getIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/get-usage.md new file mode 100644 index 0000000000..95263455e9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-usage.md @@ -0,0 +1,3 @@ +appwrite databases getUsage \ + --databaseId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get.md b/docs/examples/1.8.x/console-cli/examples/databases/get.md new file mode 100644 index 0000000000..35480b64cc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get.md @@ -0,0 +1,2 @@ +appwrite databases get \ + --databaseId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..8a5150eebd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/increment-document-attribute.md @@ -0,0 +1,7 @@ +appwrite databases incrementDocumentAttribute \ + --databaseId \ + --collectionId \ + --documentId \ + --attribute '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-attributes.md b/docs/examples/1.8.x/console-cli/examples/databases/list-attributes.md new file mode 100644 index 0000000000..a2382feb3a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-attributes.md @@ -0,0 +1,4 @@ +appwrite databases listAttributes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-collection-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..eadac47a6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-collection-logs.md @@ -0,0 +1,4 @@ +appwrite databases listCollectionLogs \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-collections.md b/docs/examples/1.8.x/console-cli/examples/databases/list-collections.md new file mode 100644 index 0000000000..b05c330be2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-collections.md @@ -0,0 +1,4 @@ +appwrite databases listCollections \ + --databaseId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-document-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..63b5394647 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-document-logs.md @@ -0,0 +1,5 @@ +appwrite databases listDocumentLogs \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/list-documents.md new file mode 100644 index 0000000000..98e389579d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-documents.md @@ -0,0 +1,4 @@ +appwrite databases listDocuments \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/databases/list-indexes.md new file mode 100644 index 0000000000..50acb4d7ad --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-indexes.md @@ -0,0 +1,4 @@ +appwrite databases listIndexes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-logs.md new file mode 100644 index 0000000000..38547c7c3c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-logs.md @@ -0,0 +1,3 @@ +appwrite databases listLogs \ + --databaseId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/list-usage.md new file mode 100644 index 0000000000..aad19fd2bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-usage.md @@ -0,0 +1,2 @@ +appwrite databases listUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-usages.md b/docs/examples/1.8.x/console-cli/examples/databases/list-usages.md new file mode 100644 index 0000000000..e909446e71 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-usages.md @@ -0,0 +1,2 @@ +appwrite databases listUsages \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list.md b/docs/examples/1.8.x/console-cli/examples/databases/list.md new file mode 100644 index 0000000000..e723bc32ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list.md @@ -0,0 +1,3 @@ +appwrite databases list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..f5adb497ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/update-collection.md new file mode 100644 index 0000000000..eab3617c80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-collection.md @@ -0,0 +1,7 @@ +appwrite databases updateCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..fe4a462664 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-document.md b/docs/examples/1.8.x/console-cli/examples/databases/update-document.md new file mode 100644 index 0000000000..a4ac55bf6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-document.md @@ -0,0 +1,6 @@ +appwrite databases updateDocument \ + --databaseId \ + --collectionId \ + --documentId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/update-documents.md new file mode 100644 index 0000000000..935f664440 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-documents.md @@ -0,0 +1,5 @@ +appwrite databases updateDocuments \ + --databaseId \ + --collectionId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..58510a6f8e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..21d56d3e64 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..a9bba3eb5e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..660cd4d148 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..a400eadc1e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..6e2dbd927d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-relationship-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateRelationshipAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..526ece0b72 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-string-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..e6f401b8ca --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update.md b/docs/examples/1.8.x/console-cli/examples/databases/update.md new file mode 100644 index 0000000000..a1e0a844e5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update.md @@ -0,0 +1,4 @@ +appwrite databases update \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md new file mode 100644 index 0000000000..151e466d02 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md @@ -0,0 +1,4 @@ +appwrite databases upsertDocument \ + --databaseId \ + --collectionId \ + --documentId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..30c7dc5b4b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md @@ -0,0 +1,3 @@ +appwrite databases upsertDocuments \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-deployment.md new file mode 100644 index 0000000000..6ac80bd73a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-deployment.md @@ -0,0 +1,6 @@ +appwrite functions createDeployment \ + --functionId \ + --code 'path/to/file.png' \ + --activate false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..4839155bd2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,4 @@ +appwrite functions createDuplicateDeployment \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-execution.md b/docs/examples/1.8.x/console-cli/examples/functions/create-execution.md new file mode 100644 index 0000000000..febe88c541 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-execution.md @@ -0,0 +1,8 @@ +appwrite functions createExecution \ + --functionId \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..a6164a3d0b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite functions createTemplateDeployment \ + --functionId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/create-variable.md new file mode 100644 index 0000000000..f35f228d41 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-variable.md @@ -0,0 +1,5 @@ +appwrite functions createVariable \ + --functionId \ + --key \ + --value \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..89f4caca66 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite functions createVcsDeployment \ + --functionId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create.md b/docs/examples/1.8.x/console-cli/examples/functions/create.md new file mode 100644 index 0000000000..ebca5741ed --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create.md @@ -0,0 +1,19 @@ +appwrite functions create \ + --functionId \ + --name \ + --runtime node-14.5 \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..2c9a6aa04a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite functions deleteDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete-execution.md b/docs/examples/1.8.x/console-cli/examples/functions/delete-execution.md new file mode 100644 index 0000000000..2926b5aaf1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete-execution.md @@ -0,0 +1,3 @@ +appwrite functions deleteExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/delete-variable.md new file mode 100644 index 0000000000..835d125dc6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete-variable.md @@ -0,0 +1,3 @@ +appwrite functions deleteVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete.md b/docs/examples/1.8.x/console-cli/examples/functions/delete.md new file mode 100644 index 0000000000..0eea41c849 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete.md @@ -0,0 +1,2 @@ +appwrite functions delete \ + --functionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..485b608623 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite functions getDeploymentDownload \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment.md new file mode 100644 index 0000000000..3da1605fea --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment.md @@ -0,0 +1,3 @@ +appwrite functions getDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-execution.md b/docs/examples/1.8.x/console-cli/examples/functions/get-execution.md new file mode 100644 index 0000000000..d593f07c43 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-execution.md @@ -0,0 +1,3 @@ +appwrite functions getExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-template.md b/docs/examples/1.8.x/console-cli/examples/functions/get-template.md new file mode 100644 index 0000000000..15c6068f35 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-template.md @@ -0,0 +1,2 @@ +appwrite functions getTemplate \ + --templateId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-usage.md b/docs/examples/1.8.x/console-cli/examples/functions/get-usage.md new file mode 100644 index 0000000000..469db0f171 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-usage.md @@ -0,0 +1,3 @@ +appwrite functions getUsage \ + --functionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/get-variable.md new file mode 100644 index 0000000000..241a91d936 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-variable.md @@ -0,0 +1,3 @@ +appwrite functions getVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get.md b/docs/examples/1.8.x/console-cli/examples/functions/get.md new file mode 100644 index 0000000000..f678ef7663 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get.md @@ -0,0 +1,2 @@ +appwrite functions get \ + --functionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-deployments.md b/docs/examples/1.8.x/console-cli/examples/functions/list-deployments.md new file mode 100644 index 0000000000..2befb86abc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-deployments.md @@ -0,0 +1,4 @@ +appwrite functions listDeployments \ + --functionId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-executions.md b/docs/examples/1.8.x/console-cli/examples/functions/list-executions.md new file mode 100644 index 0000000000..8d3136e6a4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-executions.md @@ -0,0 +1,3 @@ +appwrite functions listExecutions \ + --functionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-runtimes.md b/docs/examples/1.8.x/console-cli/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..15dc019c44 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-runtimes.md @@ -0,0 +1 @@ +appwrite functions listRuntimes diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-specifications.md b/docs/examples/1.8.x/console-cli/examples/functions/list-specifications.md new file mode 100644 index 0000000000..1d64bc68e7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-specifications.md @@ -0,0 +1 @@ +appwrite functions listSpecifications diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-templates.md b/docs/examples/1.8.x/console-cli/examples/functions/list-templates.md new file mode 100644 index 0000000000..b48bab53e1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-templates.md @@ -0,0 +1,5 @@ +appwrite functions listTemplates \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-usage.md b/docs/examples/1.8.x/console-cli/examples/functions/list-usage.md new file mode 100644 index 0000000000..8ae7855f45 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-usage.md @@ -0,0 +1,2 @@ +appwrite functions listUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-variables.md b/docs/examples/1.8.x/console-cli/examples/functions/list-variables.md new file mode 100644 index 0000000000..21bf2eb506 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-variables.md @@ -0,0 +1,2 @@ +appwrite functions listVariables \ + --functionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list.md b/docs/examples/1.8.x/console-cli/examples/functions/list.md new file mode 100644 index 0000000000..3b7551266e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list.md @@ -0,0 +1,3 @@ +appwrite functions list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/console-cli/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..06d2dcdcf0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite functions updateDeploymentStatus \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..652bfe809e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update-function-deployment.md @@ -0,0 +1,3 @@ +appwrite functions updateFunctionDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/update-variable.md new file mode 100644 index 0000000000..a2b10491c6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update-variable.md @@ -0,0 +1,6 @@ +appwrite functions updateVariable \ + --functionId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update.md b/docs/examples/1.8.x/console-cli/examples/functions/update.md new file mode 100644 index 0000000000..7ac63e0cd1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update.md @@ -0,0 +1,19 @@ +appwrite functions update \ + --functionId \ + --name \ + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md b/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md new file mode 100644 index 0000000000..f6127a175c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md @@ -0,0 +1,2 @@ +appwrite graphql mutation \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/graphql/query.md b/docs/examples/1.8.x/console-cli/examples/graphql/query.md new file mode 100644 index 0000000000..1d84bcaa6a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/graphql/query.md @@ -0,0 +1,2 @@ +appwrite graphql query \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-antivirus.md b/docs/examples/1.8.x/console-cli/examples/health/get-antivirus.md new file mode 100644 index 0000000000..96dd7e78b2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-antivirus.md @@ -0,0 +1 @@ +appwrite health getAntivirus diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-cache.md b/docs/examples/1.8.x/console-cli/examples/health/get-cache.md new file mode 100644 index 0000000000..ad1111ccf0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-cache.md @@ -0,0 +1 @@ +appwrite health getCache diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-certificate.md b/docs/examples/1.8.x/console-cli/examples/health/get-certificate.md new file mode 100644 index 0000000000..4659415822 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-certificate.md @@ -0,0 +1,2 @@ +appwrite health getCertificate \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-d-b.md b/docs/examples/1.8.x/console-cli/examples/health/get-d-b.md new file mode 100644 index 0000000000..b0ea2d3eac --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-d-b.md @@ -0,0 +1 @@ +appwrite health getDB diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/console-cli/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..724299e384 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-failed-jobs.md @@ -0,0 +1,3 @@ +appwrite health getFailedJobs \ + --name v1-database \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-pub-sub.md b/docs/examples/1.8.x/console-cli/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..aa1773b35b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-pub-sub.md @@ -0,0 +1 @@ +appwrite health getPubSub diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-builds.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..7204c2c896 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-builds.md @@ -0,0 +1,2 @@ +appwrite health getQueueBuilds \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..203e8650cc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-certificates.md @@ -0,0 +1,2 @@ +appwrite health getQueueCertificates \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-databases.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..f30b941cbc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-databases.md @@ -0,0 +1,3 @@ +appwrite health getQueueDatabases \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..1d44146dc4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-deletes.md @@ -0,0 +1,2 @@ +appwrite health getQueueDeletes \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-functions.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..4aca467306 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-functions.md @@ -0,0 +1,2 @@ +appwrite health getQueueFunctions \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-logs.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..3f1386b73a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-logs.md @@ -0,0 +1,2 @@ +appwrite health getQueueLogs \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-mails.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..a41f4c308b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-mails.md @@ -0,0 +1,2 @@ +appwrite health getQueueMails \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..11b7ff832b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-messaging.md @@ -0,0 +1,2 @@ +appwrite health getQueueMessaging \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..2f17bb56f4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-migrations.md @@ -0,0 +1,2 @@ +appwrite health getQueueMigrations \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..9cce963748 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-stats-resources.md @@ -0,0 +1,2 @@ +appwrite health getQueueStatsResources \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-usage.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..d021a3faa1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-usage.md @@ -0,0 +1,2 @@ +appwrite health getQueueUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..471175bbe4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-webhooks.md @@ -0,0 +1,2 @@ +appwrite health getQueueWebhooks \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-storage-local.md b/docs/examples/1.8.x/console-cli/examples/health/get-storage-local.md new file mode 100644 index 0000000000..b5df39fae0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-storage-local.md @@ -0,0 +1 @@ +appwrite health getStorageLocal diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-storage.md b/docs/examples/1.8.x/console-cli/examples/health/get-storage.md new file mode 100644 index 0000000000..eccd21acc3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-storage.md @@ -0,0 +1 @@ +appwrite health getStorage diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-time.md b/docs/examples/1.8.x/console-cli/examples/health/get-time.md new file mode 100644 index 0000000000..067e5daf9e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-time.md @@ -0,0 +1 @@ +appwrite health getTime diff --git a/docs/examples/1.8.x/console-cli/examples/health/get.md b/docs/examples/1.8.x/console-cli/examples/health/get.md new file mode 100644 index 0000000000..94c08e5aa3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get.md @@ -0,0 +1 @@ +appwrite health get diff --git a/docs/examples/1.8.x/console-cli/examples/locale/get.md b/docs/examples/1.8.x/console-cli/examples/locale/get.md new file mode 100644 index 0000000000..2002a06c20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/get.md @@ -0,0 +1 @@ +appwrite locale get diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-codes.md b/docs/examples/1.8.x/console-cli/examples/locale/list-codes.md new file mode 100644 index 0000000000..5586d1566c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-codes.md @@ -0,0 +1 @@ +appwrite locale listCodes diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-continents.md b/docs/examples/1.8.x/console-cli/examples/locale/list-continents.md new file mode 100644 index 0000000000..775af5d9df --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-continents.md @@ -0,0 +1 @@ +appwrite locale listContinents diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..43b7eff7ad --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md @@ -0,0 +1 @@ +appwrite locale listCountriesEU diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..072516bf71 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-phones.md @@ -0,0 +1 @@ +appwrite locale listCountriesPhones diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-countries.md b/docs/examples/1.8.x/console-cli/examples/locale/list-countries.md new file mode 100644 index 0000000000..ee7101df68 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-countries.md @@ -0,0 +1 @@ +appwrite locale listCountries diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-currencies.md b/docs/examples/1.8.x/console-cli/examples/locale/list-currencies.md new file mode 100644 index 0000000000..01b1b3c4b2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-currencies.md @@ -0,0 +1 @@ +appwrite locale listCurrencies diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-languages.md b/docs/examples/1.8.x/console-cli/examples/locale/list-languages.md new file mode 100644 index 0000000000..d47622c570 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-languages.md @@ -0,0 +1 @@ +appwrite locale listLanguages diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..8b369f403d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createApnsProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-email.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-email.md new file mode 100644 index 0000000000..2a8e03b7da --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-email.md @@ -0,0 +1,13 @@ +appwrite messaging createEmail \ + --messageId \ + --subject \ + --content \ + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..a19dcbe28c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging createFcmProvider \ + --providerId \ + --name \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6b07359194 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging createMailgunProvider \ + --providerId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..f687e36472 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging createMsg91Provider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-push.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-push.md new file mode 100644 index 0000000000..18d8ec5aec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-push.md @@ -0,0 +1,20 @@ +appwrite messaging createPush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..de8d059abb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createSendgridProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-sms.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-sms.md new file mode 100644 index 0000000000..dfc9b27ff3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-sms.md @@ -0,0 +1,8 @@ +appwrite messaging createSms \ + --messageId \ + --content \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..13f04fe648 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging createSmtpProvider \ + --providerId \ + --name \ + --host \ + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..5e65c36df7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-subscriber.md @@ -0,0 +1,4 @@ +appwrite messaging createSubscriber \ + --topicId \ + --subscriberId \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..783f7594fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTelesignProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..77185c71de --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTextmagicProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-topic.md new file mode 100644 index 0000000000..1d57e1cee0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-topic.md @@ -0,0 +1,4 @@ +appwrite messaging createTopic \ + --topicId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..91fdaae96b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTwilioProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..1939d1c04b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createVonageProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..a93885573c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete-provider.md @@ -0,0 +1,2 @@ +appwrite messaging deleteProvider \ + --providerId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..c535154df6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging deleteSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..1fa387c6ab --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete-topic.md @@ -0,0 +1,2 @@ +appwrite messaging deleteTopic \ + --topicId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete.md new file mode 100644 index 0000000000..82ff141b03 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete.md @@ -0,0 +1,2 @@ +appwrite messaging delete \ + --messageId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-message.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-message.md new file mode 100644 index 0000000000..0144f79699 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-message.md @@ -0,0 +1,2 @@ +appwrite messaging getMessage \ + --messageId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-provider.md new file mode 100644 index 0000000000..9da9f2d864 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-provider.md @@ -0,0 +1,2 @@ +appwrite messaging getProvider \ + --providerId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..02f8bc0e57 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging getSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-topic.md new file mode 100644 index 0000000000..feb2dc66b6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-topic.md @@ -0,0 +1,2 @@ +appwrite messaging getTopic \ + --topicId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..91366f35f7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-message-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listMessageLogs \ + --messageId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-messages.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-messages.md new file mode 100644 index 0000000000..6ab04b0fd2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-messages.md @@ -0,0 +1,3 @@ +appwrite messaging listMessages \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..0dee2e3f4b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-provider-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listProviderLogs \ + --providerId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-providers.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-providers.md new file mode 100644 index 0000000000..0a2ce47a3f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-providers.md @@ -0,0 +1,3 @@ +appwrite messaging listProviders \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..4a04ac4373 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listSubscriberLogs \ + --subscriberId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..2eed8bd3f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscribers.md @@ -0,0 +1,4 @@ +appwrite messaging listSubscribers \ + --topicId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-targets.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-targets.md new file mode 100644 index 0000000000..7efa50ee3b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-targets.md @@ -0,0 +1,3 @@ +appwrite messaging listTargets \ + --messageId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..f23c10aba6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-topic-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listTopicLogs \ + --topicId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-topics.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-topics.md new file mode 100644 index 0000000000..1810a7bd7b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-topics.md @@ -0,0 +1,3 @@ +appwrite messaging listTopics \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..9e895a066a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateApnsProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-email.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-email.md new file mode 100644 index 0000000000..934fd29213 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-email.md @@ -0,0 +1,13 @@ +appwrite messaging updateEmail \ + --messageId \ + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..000022361f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging updateFcmProvider \ + --providerId \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f35c5e9157 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging updateMailgunProvider \ + --providerId \ + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..8e2d604a19 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateMsg91Provider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-push.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-push.md new file mode 100644 index 0000000000..1f4427cee7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-push.md @@ -0,0 +1,20 @@ +appwrite messaging updatePush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..7f2e97dbf7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateSendgridProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-sms.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-sms.md new file mode 100644 index 0000000000..a30ff43d0c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-sms.md @@ -0,0 +1,8 @@ +appwrite messaging updateSms \ + --messageId \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..4e0f7b6b8d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging updateSmtpProvider \ + --providerId \ + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..0a92f2cacd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTelesignProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..79160b2461 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTextmagicProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-topic.md new file mode 100644 index 0000000000..d10b0edde3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-topic.md @@ -0,0 +1,4 @@ +appwrite messaging updateTopic \ + --topicId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..c967d724af --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTwilioProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..11f7963be2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateVonageProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-appwrite-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..73e9ee62d8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,5 @@ +appwrite migrations createAppwriteMigration \ + --resources one two three \ + --endpoint https://example.com \ + --projectId \ + --apiKey diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md new file mode 100644 index 0000000000..594bc85052 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md @@ -0,0 +1,4 @@ +appwrite migrations createCsvMigration \ + --bucketId \ + --fileId \ + --resourceId [ID1:ID2] diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-firebase-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..3dfb3aeac6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-firebase-migration.md @@ -0,0 +1,3 @@ +appwrite migrations createFirebaseMigration \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-n-host-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..d959897109 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-n-host-migration.md @@ -0,0 +1,9 @@ +appwrite migrations createNHostMigration \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-supabase-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..0620f3ba2e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-supabase-migration.md @@ -0,0 +1,8 @@ +appwrite migrations createSupabaseMigration \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/delete.md b/docs/examples/1.8.x/console-cli/examples/migrations/delete.md new file mode 100644 index 0000000000..9dac1aa3db --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/delete.md @@ -0,0 +1,2 @@ +appwrite migrations delete \ + --migrationId diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-appwrite-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..745e9fb98c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-appwrite-report.md @@ -0,0 +1,5 @@ +appwrite migrations getAppwriteReport \ + --resources one two three \ + --endpoint https://example.com \ + --projectID \ + --key diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-firebase-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..73c7e1ca14 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-firebase-report.md @@ -0,0 +1,3 @@ +appwrite migrations getFirebaseReport \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-n-host-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..6b7e2eaff2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-n-host-report.md @@ -0,0 +1,9 @@ +appwrite migrations getNHostReport \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-supabase-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..9754f38e24 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-supabase-report.md @@ -0,0 +1,8 @@ +appwrite migrations getSupabaseReport \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get.md b/docs/examples/1.8.x/console-cli/examples/migrations/get.md new file mode 100644 index 0000000000..8810646c7e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get.md @@ -0,0 +1,2 @@ +appwrite migrations get \ + --migrationId diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/list.md b/docs/examples/1.8.x/console-cli/examples/migrations/list.md new file mode 100644 index 0000000000..c120a61e80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/list.md @@ -0,0 +1,3 @@ +appwrite migrations list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/retry.md b/docs/examples/1.8.x/console-cli/examples/migrations/retry.md new file mode 100644 index 0000000000..518f86cee7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/retry.md @@ -0,0 +1,2 @@ +appwrite migrations retry \ + --migrationId diff --git a/docs/examples/1.8.x/console-cli/examples/project/create-variable.md b/docs/examples/1.8.x/console-cli/examples/project/create-variable.md new file mode 100644 index 0000000000..253d6ddf75 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/create-variable.md @@ -0,0 +1,4 @@ +appwrite project createVariable \ + --key \ + --value \ + diff --git a/docs/examples/1.8.x/console-cli/examples/project/delete-variable.md b/docs/examples/1.8.x/console-cli/examples/project/delete-variable.md new file mode 100644 index 0000000000..7fdda874fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/delete-variable.md @@ -0,0 +1,2 @@ +appwrite project deleteVariable \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/project/get-usage.md b/docs/examples/1.8.x/console-cli/examples/project/get-usage.md new file mode 100644 index 0000000000..9b4c296a8c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/get-usage.md @@ -0,0 +1,4 @@ +appwrite project getUsage \ + --startDate '' \ + --endDate '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/project/get-variable.md b/docs/examples/1.8.x/console-cli/examples/project/get-variable.md new file mode 100644 index 0000000000..b2d482586b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/get-variable.md @@ -0,0 +1,2 @@ +appwrite project getVariable \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/project/list-variables.md b/docs/examples/1.8.x/console-cli/examples/project/list-variables.md new file mode 100644 index 0000000000..bd26c7db6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/list-variables.md @@ -0,0 +1 @@ +appwrite project listVariables diff --git a/docs/examples/1.8.x/console-cli/examples/project/update-variable.md b/docs/examples/1.8.x/console-cli/examples/project/update-variable.md new file mode 100644 index 0000000000..4365b64888 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/update-variable.md @@ -0,0 +1,5 @@ +appwrite project updateVariable \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/create-dev-key.md new file mode 100644 index 0000000000..8b9ec8969a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-dev-key.md @@ -0,0 +1,4 @@ +appwrite projects createDevKey \ + --projectId \ + --name \ + --expire '' diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md b/docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md new file mode 100644 index 0000000000..d703d36b65 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite projects createJWT \ + --projectId \ + --scopes one two three \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-key.md b/docs/examples/1.8.x/console-cli/examples/projects/create-key.md new file mode 100644 index 0000000000..fb986dcebc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-key.md @@ -0,0 +1,5 @@ +appwrite projects createKey \ + --projectId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/create-platform.md new file mode 100644 index 0000000000..8727d21d64 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-platform.md @@ -0,0 +1,7 @@ +appwrite projects createPlatform \ + --projectId \ + --type web \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-smtp-test.md b/docs/examples/1.8.x/console-cli/examples/projects/create-smtp-test.md new file mode 100644 index 0000000000..66ce5880aa --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-smtp-test.md @@ -0,0 +1,11 @@ +appwrite projects createSmtpTest \ + --projectId \ + --emails one two three \ + --senderName \ + --senderEmail email@example.com \ + --host '' \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/create-webhook.md new file mode 100644 index 0000000000..03ecf4110d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-webhook.md @@ -0,0 +1,9 @@ +appwrite projects createWebhook \ + --projectId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create.md b/docs/examples/1.8.x/console-cli/examples/projects/create.md new file mode 100644 index 0000000000..0504785503 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create.md @@ -0,0 +1,14 @@ +appwrite projects create \ + --projectId '' \ + --name \ + --teamId \ + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-dev-key.md new file mode 100644 index 0000000000..2859a3309f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-dev-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteDevKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-email-template.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..01ce0fac68 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-email-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-key.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-key.md new file mode 100644 index 0000000000..6baf05706e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-platform.md new file mode 100644 index 0000000000..a85bd865ba --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-platform.md @@ -0,0 +1,3 @@ +appwrite projects deletePlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-sms-template.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..3afcf649c7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..a67301ef07 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-webhook.md @@ -0,0 +1,3 @@ +appwrite projects deleteWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete.md b/docs/examples/1.8.x/console-cli/examples/projects/delete.md new file mode 100644 index 0000000000..a4ffc70c91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete.md @@ -0,0 +1,2 @@ +appwrite projects delete \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/get-dev-key.md new file mode 100644 index 0000000000..cfc37ed437 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-dev-key.md @@ -0,0 +1,3 @@ +appwrite projects getDevKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-email-template.md b/docs/examples/1.8.x/console-cli/examples/projects/get-email-template.md new file mode 100644 index 0000000000..6e4c21e52b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-email-template.md @@ -0,0 +1,4 @@ +appwrite projects getEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-key.md b/docs/examples/1.8.x/console-cli/examples/projects/get-key.md new file mode 100644 index 0000000000..f69b51bbe2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-key.md @@ -0,0 +1,3 @@ +appwrite projects getKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/get-platform.md new file mode 100644 index 0000000000..67648be035 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-platform.md @@ -0,0 +1,3 @@ +appwrite projects getPlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-sms-template.md b/docs/examples/1.8.x/console-cli/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..c655953c8e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects getSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/get-webhook.md new file mode 100644 index 0000000000..890bf37069 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-webhook.md @@ -0,0 +1,3 @@ +appwrite projects getWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get.md b/docs/examples/1.8.x/console-cli/examples/projects/get.md new file mode 100644 index 0000000000..919321b81d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get.md @@ -0,0 +1,2 @@ +appwrite projects get \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-dev-keys.md b/docs/examples/1.8.x/console-cli/examples/projects/list-dev-keys.md new file mode 100644 index 0000000000..d552cb3bca --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-dev-keys.md @@ -0,0 +1,3 @@ +appwrite projects listDevKeys \ + --projectId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-keys.md b/docs/examples/1.8.x/console-cli/examples/projects/list-keys.md new file mode 100644 index 0000000000..cc37680b5b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-keys.md @@ -0,0 +1,2 @@ +appwrite projects listKeys \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-platforms.md b/docs/examples/1.8.x/console-cli/examples/projects/list-platforms.md new file mode 100644 index 0000000000..5fc2ea4106 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-platforms.md @@ -0,0 +1,2 @@ +appwrite projects listPlatforms \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-webhooks.md b/docs/examples/1.8.x/console-cli/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..dcf9953f80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-webhooks.md @@ -0,0 +1,2 @@ +appwrite projects listWebhooks \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list.md b/docs/examples/1.8.x/console-cli/examples/projects/list.md new file mode 100644 index 0000000000..0d3dd7a539 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list.md @@ -0,0 +1,3 @@ +appwrite projects list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-api-status-all.md b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status-all.md new file mode 100644 index 0000000000..e5f63c59a3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateApiStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-api-status.md b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status.md new file mode 100644 index 0000000000..01120957af --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status.md @@ -0,0 +1,4 @@ +appwrite projects updateApiStatus \ + --projectId \ + --api rest \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-duration.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..ad6f8ac97c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-duration.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthDuration \ + --projectId \ + --duration 0 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-limit.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..9d01fa5a1a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthLimit \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..f477bba56d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordDictionary \ + --projectId \ + --enabled false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-history.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..8b9b90a32a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-history.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordHistory \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..2a1294d17b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthSessionsLimit \ + --projectId \ + --limit 1 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-status.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..848987b2f8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-status.md @@ -0,0 +1,4 @@ +appwrite projects updateAuthStatus \ + --projectId \ + --method email-password \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/update-dev-key.md new file mode 100644 index 0000000000..cc95030389 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-dev-key.md @@ -0,0 +1,5 @@ +appwrite projects updateDevKey \ + --projectId \ + --keyId \ + --name \ + --expire '' diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-email-template.md b/docs/examples/1.8.x/console-cli/examples/projects/update-email-template.md new file mode 100644 index 0000000000..a3acd066ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-email-template.md @@ -0,0 +1,9 @@ +appwrite projects updateEmailTemplate \ + --projectId \ + --type verification \ + --locale af \ + --subject \ + --message \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-key.md b/docs/examples/1.8.x/console-cli/examples/projects/update-key.md new file mode 100644 index 0000000000..6d3dc198da --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-key.md @@ -0,0 +1,6 @@ +appwrite projects updateKey \ + --projectId \ + --keyId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-memberships-privacy.md b/docs/examples/1.8.x/console-cli/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..6c811ccfce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-memberships-privacy.md @@ -0,0 +1,5 @@ +appwrite projects updateMembershipsPrivacy \ + --projectId \ + --userName false \ + --userEmail false \ + --mfa false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-mock-numbers.md b/docs/examples/1.8.x/console-cli/examples/projects/update-mock-numbers.md new file mode 100644 index 0000000000..733cc16887 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-mock-numbers.md @@ -0,0 +1,3 @@ +appwrite projects updateMockNumbers \ + --projectId \ + --numbers one two three diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md b/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..92f6718962 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md @@ -0,0 +1,6 @@ +appwrite projects updateOAuth2 \ + --projectId \ + --provider amazon \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-personal-data-check.md b/docs/examples/1.8.x/console-cli/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..21dca78369 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-personal-data-check.md @@ -0,0 +1,3 @@ +appwrite projects updatePersonalDataCheck \ + --projectId \ + --enabled false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/update-platform.md new file mode 100644 index 0000000000..05b1602ae9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-platform.md @@ -0,0 +1,7 @@ +appwrite projects updatePlatform \ + --projectId \ + --platformId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-service-status-all.md b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..1ffb77e085 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateServiceStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-service-status.md b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status.md new file mode 100644 index 0000000000..03963a1214 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status.md @@ -0,0 +1,4 @@ +appwrite projects updateServiceStatus \ + --projectId \ + --service account \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-session-alerts.md b/docs/examples/1.8.x/console-cli/examples/projects/update-session-alerts.md new file mode 100644 index 0000000000..bd23b7417a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-session-alerts.md @@ -0,0 +1,3 @@ +appwrite projects updateSessionAlerts \ + --projectId \ + --alerts false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-session-invalidation.md b/docs/examples/1.8.x/console-cli/examples/projects/update-session-invalidation.md new file mode 100644 index 0000000000..21e8511f64 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-session-invalidation.md @@ -0,0 +1,3 @@ +appwrite projects updateSessionInvalidation \ + --projectId \ + --enabled false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-sms-template.md b/docs/examples/1.8.x/console-cli/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..fc8310eb25 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-sms-template.md @@ -0,0 +1,5 @@ +appwrite projects updateSmsTemplate \ + --projectId \ + --type verification \ + --locale af \ + --message diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-smtp.md b/docs/examples/1.8.x/console-cli/examples/projects/update-smtp.md new file mode 100644 index 0000000000..0afbe9cec9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-smtp.md @@ -0,0 +1,11 @@ +appwrite projects updateSmtp \ + --projectId \ + --enabled false \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-team.md b/docs/examples/1.8.x/console-cli/examples/projects/update-team.md new file mode 100644 index 0000000000..49214ad9f3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-team.md @@ -0,0 +1,3 @@ +appwrite projects updateTeam \ + --projectId \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-webhook-signature.md b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..6034ef01f6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook-signature.md @@ -0,0 +1,3 @@ +appwrite projects updateWebhookSignature \ + --projectId \ + --webhookId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook.md new file mode 100644 index 0000000000..51c536d74c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook.md @@ -0,0 +1,10 @@ +appwrite projects updateWebhook \ + --projectId \ + --webhookId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update.md b/docs/examples/1.8.x/console-cli/examples/projects/update.md new file mode 100644 index 0000000000..d4df289636 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update.md @@ -0,0 +1,12 @@ +appwrite projects update \ + --projectId \ + --name \ + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 0000000000..5746b94b1e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,2 @@ +appwrite proxy createAPIRule \ + --domain '' diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-function-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-function-rule.md new file mode 100644 index 0000000000..380650c208 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-function-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createFunctionRule \ + --domain '' \ + --functionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-redirect-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-redirect-rule.md new file mode 100644 index 0000000000..ec9098a748 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-redirect-rule.md @@ -0,0 +1,6 @@ +appwrite proxy createRedirectRule \ + --domain '' \ + --url https://example.com \ + --statusCode 301 \ + --resourceId \ + --resourceType site diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-site-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-site-rule.md new file mode 100644 index 0000000000..eb41bd7158 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-site-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createSiteRule \ + --domain '' \ + --siteId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/delete-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..b11b6ca23e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/delete-rule.md @@ -0,0 +1,2 @@ +appwrite proxy deleteRule \ + --ruleId diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/get-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/get-rule.md new file mode 100644 index 0000000000..85d11a50b1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/get-rule.md @@ -0,0 +1,2 @@ +appwrite proxy getRule \ + --ruleId diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/list-rules.md b/docs/examples/1.8.x/console-cli/examples/proxy/list-rules.md new file mode 100644 index 0000000000..bc654bac5c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/list-rules.md @@ -0,0 +1,3 @@ +appwrite proxy listRules \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/update-rule-verification.md b/docs/examples/1.8.x/console-cli/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..8200d15702 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/update-rule-verification.md @@ -0,0 +1,2 @@ +appwrite proxy updateRuleVerification \ + --ruleId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-deployment.md new file mode 100644 index 0000000000..a83d7f3cfe --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createDeployment \ + --siteId \ + --code 'path/to/file.png' \ + --activate false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..bab63ca8a3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,3 @@ +appwrite sites createDuplicateDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..2aaaf445db --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createTemplateDeployment \ + --siteId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/create-variable.md new file mode 100644 index 0000000000..b640321317 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-variable.md @@ -0,0 +1,5 @@ +appwrite sites createVariable \ + --siteId \ + --key \ + --value \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..85c96f93ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite sites createVcsDeployment \ + --siteId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create.md b/docs/examples/1.8.x/console-cli/examples/sites/create.md new file mode 100644 index 0000000000..bd7e86e70f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create.md @@ -0,0 +1,19 @@ +appwrite sites create \ + --siteId \ + --name \ + --framework analog \ + --buildRuntime node-14.5 \ + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..c1cbf49637 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite sites deleteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete-log.md b/docs/examples/1.8.x/console-cli/examples/sites/delete-log.md new file mode 100644 index 0000000000..6769be255c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete-log.md @@ -0,0 +1,3 @@ +appwrite sites deleteLog \ + --siteId \ + --logId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/delete-variable.md new file mode 100644 index 0000000000..60d9ecf4eb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete-variable.md @@ -0,0 +1,3 @@ +appwrite sites deleteVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete.md b/docs/examples/1.8.x/console-cli/examples/sites/delete.md new file mode 100644 index 0000000000..9071454850 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete.md @@ -0,0 +1,2 @@ +appwrite sites delete \ + --siteId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..1fae298796 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite sites getDeploymentDownload \ + --siteId \ + --deploymentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment.md new file mode 100644 index 0000000000..93680ff70d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment.md @@ -0,0 +1,3 @@ +appwrite sites getDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-log.md b/docs/examples/1.8.x/console-cli/examples/sites/get-log.md new file mode 100644 index 0000000000..7867aba05e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-log.md @@ -0,0 +1,3 @@ +appwrite sites getLog \ + --siteId \ + --logId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-template.md b/docs/examples/1.8.x/console-cli/examples/sites/get-template.md new file mode 100644 index 0000000000..e04dd2e120 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-template.md @@ -0,0 +1,2 @@ +appwrite sites getTemplate \ + --templateId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-usage.md b/docs/examples/1.8.x/console-cli/examples/sites/get-usage.md new file mode 100644 index 0000000000..6de7d6bde8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-usage.md @@ -0,0 +1,3 @@ +appwrite sites getUsage \ + --siteId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/get-variable.md new file mode 100644 index 0000000000..b60b577c38 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-variable.md @@ -0,0 +1,3 @@ +appwrite sites getVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get.md b/docs/examples/1.8.x/console-cli/examples/sites/get.md new file mode 100644 index 0000000000..7922efa5f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get.md @@ -0,0 +1,2 @@ +appwrite sites get \ + --siteId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-deployments.md b/docs/examples/1.8.x/console-cli/examples/sites/list-deployments.md new file mode 100644 index 0000000000..5ab2cdc104 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-deployments.md @@ -0,0 +1,4 @@ +appwrite sites listDeployments \ + --siteId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-frameworks.md b/docs/examples/1.8.x/console-cli/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..1d9b6b4b87 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-frameworks.md @@ -0,0 +1 @@ +appwrite sites listFrameworks diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-logs.md b/docs/examples/1.8.x/console-cli/examples/sites/list-logs.md new file mode 100644 index 0000000000..f13864fe6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-logs.md @@ -0,0 +1,3 @@ +appwrite sites listLogs \ + --siteId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-specifications.md b/docs/examples/1.8.x/console-cli/examples/sites/list-specifications.md new file mode 100644 index 0000000000..dc1a16c9dc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-specifications.md @@ -0,0 +1 @@ +appwrite sites listSpecifications diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-templates.md b/docs/examples/1.8.x/console-cli/examples/sites/list-templates.md new file mode 100644 index 0000000000..9d93913d94 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-templates.md @@ -0,0 +1,5 @@ +appwrite sites listTemplates \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-usage.md b/docs/examples/1.8.x/console-cli/examples/sites/list-usage.md new file mode 100644 index 0000000000..a6f43f61e7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-usage.md @@ -0,0 +1,2 @@ +appwrite sites listUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-variables.md b/docs/examples/1.8.x/console-cli/examples/sites/list-variables.md new file mode 100644 index 0000000000..13a258b054 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-variables.md @@ -0,0 +1,2 @@ +appwrite sites listVariables \ + --siteId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list.md b/docs/examples/1.8.x/console-cli/examples/sites/list.md new file mode 100644 index 0000000000..0cad70e894 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list.md @@ -0,0 +1,3 @@ +appwrite sites list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/console-cli/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..7923b384f6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite sites updateDeploymentStatus \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..de877d8ae7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update-site-deployment.md @@ -0,0 +1,3 @@ +appwrite sites updateSiteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/update-variable.md new file mode 100644 index 0000000000..e968771056 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update-variable.md @@ -0,0 +1,6 @@ +appwrite sites updateVariable \ + --siteId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update.md b/docs/examples/1.8.x/console-cli/examples/sites/update.md new file mode 100644 index 0000000000..192ee26e3e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update.md @@ -0,0 +1,19 @@ +appwrite sites update \ + --siteId \ + --name \ + --framework analog \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/create-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/create-bucket.md new file mode 100644 index 0000000000..878c10d253 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/create-bucket.md @@ -0,0 +1,11 @@ +appwrite storage createBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/create-file.md b/docs/examples/1.8.x/console-cli/examples/storage/create-file.md new file mode 100644 index 0000000000..67bd4da2c0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/create-file.md @@ -0,0 +1,5 @@ +appwrite storage createFile \ + --bucketId \ + --fileId \ + --file 'path/to/file.png' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/delete-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..e51797e12c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/delete-bucket.md @@ -0,0 +1,2 @@ +appwrite storage deleteBucket \ + --bucketId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/delete-file.md b/docs/examples/1.8.x/console-cli/examples/storage/delete-file.md new file mode 100644 index 0000000000..79c03e8288 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/delete-file.md @@ -0,0 +1,3 @@ +appwrite storage deleteFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-bucket-usage.md b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..df3659c60a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket-usage.md @@ -0,0 +1,3 @@ +appwrite storage getBucketUsage \ + --bucketId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket.md new file mode 100644 index 0000000000..cf8725b35d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket.md @@ -0,0 +1,2 @@ +appwrite storage getBucket \ + --bucketId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file-download.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file-download.md new file mode 100644 index 0000000000..79f3368d87 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file-download.md @@ -0,0 +1,4 @@ +appwrite storage getFileDownload \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file-preview.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..de437af65b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file-preview.md @@ -0,0 +1,15 @@ +appwrite storage getFilePreview \ + --bucketId \ + --fileId \ + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file-view.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file-view.md new file mode 100644 index 0000000000..689cf1233b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file-view.md @@ -0,0 +1,4 @@ +appwrite storage getFileView \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file.md new file mode 100644 index 0000000000..641c20d2b0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file.md @@ -0,0 +1,3 @@ +appwrite storage getFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-usage.md b/docs/examples/1.8.x/console-cli/examples/storage/get-usage.md new file mode 100644 index 0000000000..29466e02f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-usage.md @@ -0,0 +1,2 @@ +appwrite storage getUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/list-buckets.md b/docs/examples/1.8.x/console-cli/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a5cad1988f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/list-buckets.md @@ -0,0 +1,3 @@ +appwrite storage listBuckets \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/list-files.md b/docs/examples/1.8.x/console-cli/examples/storage/list-files.md new file mode 100644 index 0000000000..0e1c2f09c0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/list-files.md @@ -0,0 +1,4 @@ +appwrite storage listFiles \ + --bucketId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/update-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/update-bucket.md new file mode 100644 index 0000000000..b006a7bf74 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/update-bucket.md @@ -0,0 +1,11 @@ +appwrite storage updateBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/update-file.md b/docs/examples/1.8.x/console-cli/examples/storage/update-file.md new file mode 100644 index 0000000000..593ea658a0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/update-file.md @@ -0,0 +1,5 @@ +appwrite storage updateFile \ + --bucketId \ + --fileId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..88e6bf8853 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tables createBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..de28b7537c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tables createDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md new file mode 100644 index 0000000000..23b672e62d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md @@ -0,0 +1,7 @@ +appwrite tables createEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..4cd3e1d241 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md @@ -0,0 +1,8 @@ +appwrite tables createEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md new file mode 100644 index 0000000000..9c69e29e91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md @@ -0,0 +1,9 @@ +appwrite tables createFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-index.md b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md new file mode 100644 index 0000000000..4c6d641727 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md @@ -0,0 +1,8 @@ +appwrite tables createIndex \ + --databaseId \ + --tableId \ + --key '' \ + --type key \ + --columns one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..afab48e803 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md @@ -0,0 +1,9 @@ +appwrite tables createIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..000b54b918 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md @@ -0,0 +1,7 @@ +appwrite tables createIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..4ce3342768 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md @@ -0,0 +1,9 @@ +appwrite tables createRelationshipColumn \ + --databaseId \ + --tableId \ + --relatedTableId \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-row.md b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md new file mode 100644 index 0000000000..e446de157b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md @@ -0,0 +1,6 @@ +appwrite tables createRow \ + --databaseId \ + --tableId \ + --rowId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md new file mode 100644 index 0000000000..cb7c68dd7b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md @@ -0,0 +1,4 @@ +appwrite tables createRows \ + --databaseId \ + --tableId \ + --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md new file mode 100644 index 0000000000..4df1792a34 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md @@ -0,0 +1,9 @@ +appwrite tables createStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md new file mode 100644 index 0000000000..fcb81491bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md @@ -0,0 +1,7 @@ +appwrite tables createUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create.md b/docs/examples/1.8.x/console-cli/examples/tables/create.md new file mode 100644 index 0000000000..09f52f16a1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create.md @@ -0,0 +1,7 @@ +appwrite tables create \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..73743c21ce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md @@ -0,0 +1,7 @@ +appwrite tables decrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md new file mode 100644 index 0000000000..e659af54d0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md @@ -0,0 +1,4 @@ +appwrite tables deleteColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md new file mode 100644 index 0000000000..0de1e417d3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md @@ -0,0 +1,4 @@ +appwrite tables deleteIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md new file mode 100644 index 0000000000..d6918be89e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md @@ -0,0 +1,4 @@ +appwrite tables deleteRow \ + --databaseId \ + --tableId \ + --rowId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md new file mode 100644 index 0000000000..579586b561 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md @@ -0,0 +1,4 @@ +appwrite tables deleteRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete.md b/docs/examples/1.8.x/console-cli/examples/tables/delete.md new file mode 100644 index 0000000000..0f189e09f1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete.md @@ -0,0 +1,3 @@ +appwrite tables delete \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-column.md b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md new file mode 100644 index 0000000000..33a94b5ebc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md @@ -0,0 +1,4 @@ +appwrite tables getColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-index.md b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md new file mode 100644 index 0000000000..e956175e09 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md @@ -0,0 +1,4 @@ +appwrite tables getIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-row.md b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md new file mode 100644 index 0000000000..5b3b64bfbc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md @@ -0,0 +1,5 @@ +appwrite tables getRow \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md new file mode 100644 index 0000000000..f766a418a0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md @@ -0,0 +1,4 @@ +appwrite tables getTableUsage \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md new file mode 100644 index 0000000000..ca955ce6df --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md @@ -0,0 +1,4 @@ +appwrite tables getUsage \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get.md b/docs/examples/1.8.x/console-cli/examples/tables/get.md new file mode 100644 index 0000000000..a41e6c10ed --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get.md @@ -0,0 +1,3 @@ +appwrite tables get \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..da73950231 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md @@ -0,0 +1,7 @@ +appwrite tables incrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md new file mode 100644 index 0000000000..0439d58127 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md @@ -0,0 +1,4 @@ +appwrite tables listColumns \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md new file mode 100644 index 0000000000..b5fd85b911 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md @@ -0,0 +1,4 @@ +appwrite tables listIndexes \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md new file mode 100644 index 0000000000..08c4ff0f8d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md @@ -0,0 +1,4 @@ +appwrite tables listLogs \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md new file mode 100644 index 0000000000..e7a8c5b8ce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md @@ -0,0 +1,5 @@ +appwrite tables listRowLogs \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md new file mode 100644 index 0000000000..2a6d69d574 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md @@ -0,0 +1,4 @@ +appwrite tables listRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list.md b/docs/examples/1.8.x/console-cli/examples/tables/list.md new file mode 100644 index 0000000000..1c58d9ed03 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list.md @@ -0,0 +1,4 @@ +appwrite tables list \ + --databaseId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..7d736f35e5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tables updateBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..3da3e4a919 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tables updateDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md new file mode 100644 index 0000000000..df718b8d9a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md @@ -0,0 +1,7 @@ +appwrite tables updateEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..55c55fc2bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md @@ -0,0 +1,8 @@ +appwrite tables updateEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md new file mode 100644 index 0000000000..99667a8447 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md @@ -0,0 +1,9 @@ +appwrite tables updateFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..098efa0e3e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md @@ -0,0 +1,9 @@ +appwrite tables updateIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..50eadc3fff --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md @@ -0,0 +1,7 @@ +appwrite tables updateIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..43e0c0ae6e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md @@ -0,0 +1,6 @@ +appwrite tables updateRelationshipColumn \ + --databaseId \ + --tableId \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-row.md b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md new file mode 100644 index 0000000000..d5cd0fe4ee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md @@ -0,0 +1,6 @@ +appwrite tables updateRow \ + --databaseId \ + --tableId \ + --rowId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md new file mode 100644 index 0000000000..173d608d5a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md @@ -0,0 +1,5 @@ +appwrite tables updateRows \ + --databaseId \ + --tableId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md new file mode 100644 index 0000000000..3feaa734ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md @@ -0,0 +1,8 @@ +appwrite tables updateStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2df1ab14d7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md @@ -0,0 +1,7 @@ +appwrite tables updateUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update.md b/docs/examples/1.8.x/console-cli/examples/tables/update.md new file mode 100644 index 0000000000..a1550287c8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update.md @@ -0,0 +1,7 @@ +appwrite tables update \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md new file mode 100644 index 0000000000..0281a89b20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md @@ -0,0 +1,4 @@ +appwrite tables upsertRow \ + --databaseId \ + --tableId \ + --rowId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..828caf8f10 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md @@ -0,0 +1,3 @@ +appwrite tables upsertRows \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/create-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/create-membership.md new file mode 100644 index 0000000000..0d0fc8df09 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/create-membership.md @@ -0,0 +1,8 @@ +appwrite teams createMembership \ + --teamId \ + --roles one two three \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/create.md b/docs/examples/1.8.x/console-cli/examples/teams/create.md new file mode 100644 index 0000000000..e0f9a126f2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/create.md @@ -0,0 +1,4 @@ +appwrite teams create \ + --teamId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/delete-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/delete-membership.md new file mode 100644 index 0000000000..58d0adbac7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/delete-membership.md @@ -0,0 +1,3 @@ +appwrite teams deleteMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/delete.md b/docs/examples/1.8.x/console-cli/examples/teams/delete.md new file mode 100644 index 0000000000..5b018158cd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/delete.md @@ -0,0 +1,2 @@ +appwrite teams delete \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/get-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/get-membership.md new file mode 100644 index 0000000000..5e6af4c1a1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/get-membership.md @@ -0,0 +1,3 @@ +appwrite teams getMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/get-prefs.md b/docs/examples/1.8.x/console-cli/examples/teams/get-prefs.md new file mode 100644 index 0000000000..2ab1f1dc01 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/get-prefs.md @@ -0,0 +1,2 @@ +appwrite teams getPrefs \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/get.md b/docs/examples/1.8.x/console-cli/examples/teams/get.md new file mode 100644 index 0000000000..c8e75b7543 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/get.md @@ -0,0 +1,2 @@ +appwrite teams get \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/list-logs.md b/docs/examples/1.8.x/console-cli/examples/teams/list-logs.md new file mode 100644 index 0000000000..66149350d8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/list-logs.md @@ -0,0 +1,3 @@ +appwrite teams listLogs \ + --teamId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/list-memberships.md b/docs/examples/1.8.x/console-cli/examples/teams/list-memberships.md new file mode 100644 index 0000000000..050ea961d2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/list-memberships.md @@ -0,0 +1,4 @@ +appwrite teams listMemberships \ + --teamId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/list.md b/docs/examples/1.8.x/console-cli/examples/teams/list.md new file mode 100644 index 0000000000..dfffc4d4dd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/list.md @@ -0,0 +1,3 @@ +appwrite teams list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-membership-status.md b/docs/examples/1.8.x/console-cli/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..aa4acf9457 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-membership-status.md @@ -0,0 +1,5 @@ +appwrite teams updateMembershipStatus \ + --teamId \ + --membershipId \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/update-membership.md new file mode 100644 index 0000000000..6cfda92920 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-membership.md @@ -0,0 +1,4 @@ +appwrite teams updateMembership \ + --teamId \ + --membershipId \ + --roles one two three diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-name.md b/docs/examples/1.8.x/console-cli/examples/teams/update-name.md new file mode 100644 index 0000000000..8c73e00d7b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-name.md @@ -0,0 +1,3 @@ +appwrite teams updateName \ + --teamId \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-prefs.md b/docs/examples/1.8.x/console-cli/examples/teams/update-prefs.md new file mode 100644 index 0000000000..b6fc5a8f6e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-prefs.md @@ -0,0 +1,3 @@ +appwrite teams updatePrefs \ + --teamId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/create-file-token.md b/docs/examples/1.8.x/console-cli/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..8de8d7ac6c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/create-file-token.md @@ -0,0 +1,4 @@ +appwrite tokens createFileToken \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/delete.md b/docs/examples/1.8.x/console-cli/examples/tokens/delete.md new file mode 100644 index 0000000000..c25ea4a4b4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/delete.md @@ -0,0 +1,2 @@ +appwrite tokens delete \ + --tokenId diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/get.md b/docs/examples/1.8.x/console-cli/examples/tokens/get.md new file mode 100644 index 0000000000..2c48280b0d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/get.md @@ -0,0 +1,2 @@ +appwrite tokens get \ + --tokenId diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/list.md b/docs/examples/1.8.x/console-cli/examples/tokens/list.md new file mode 100644 index 0000000000..a808e545ca --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/list.md @@ -0,0 +1,4 @@ +appwrite tokens list \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/update.md b/docs/examples/1.8.x/console-cli/examples/tokens/update.md new file mode 100644 index 0000000000..73f21609b6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/update.md @@ -0,0 +1,3 @@ +appwrite tokens update \ + --tokenId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md b/docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md new file mode 100644 index 0000000000..b0c7494e20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md @@ -0,0 +1,5 @@ +appwrite users createArgon2User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..b5686721b5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-bcrypt-user.md @@ -0,0 +1,5 @@ +appwrite users createBcryptUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md b/docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..220086bb1a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite users createJWT \ + --userId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md b/docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..ba37a78be2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md @@ -0,0 +1,5 @@ +appwrite users createMD5User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..4dbd98ff8a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users createMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..9dc378dc99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md @@ -0,0 +1,5 @@ +appwrite users createPHPassUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..57483625e9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md @@ -0,0 +1,6 @@ +appwrite users createSHAUser \ + --userId \ + --email email@example.com \ + --password password \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..25fc60b6e1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,8 @@ +appwrite users createScryptModifiedUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordSaltSeparator \ + --passwordSignerKey \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..3fc56b1ee3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-user.md @@ -0,0 +1,10 @@ +appwrite users createScryptUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordCpu null \ + --passwordMemory null \ + --passwordParallel null \ + --passwordLength null \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-session.md b/docs/examples/1.8.x/console-cli/examples/users/create-session.md new file mode 100644 index 0000000000..c8938fa706 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-session.md @@ -0,0 +1,2 @@ +appwrite users createSession \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-target.md b/docs/examples/1.8.x/console-cli/examples/users/create-target.md new file mode 100644 index 0000000000..8d9306b00e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-target.md @@ -0,0 +1,7 @@ +appwrite users createTarget \ + --userId \ + --targetId \ + --providerType email \ + --identifier \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-token.md b/docs/examples/1.8.x/console-cli/examples/users/create-token.md new file mode 100644 index 0000000000..9962e72c73 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-token.md @@ -0,0 +1,4 @@ +appwrite users createToken \ + --userId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create.md b/docs/examples/1.8.x/console-cli/examples/users/create.md new file mode 100644 index 0000000000..e828f56ecb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create.md @@ -0,0 +1,6 @@ +appwrite users create \ + --userId \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-identity.md b/docs/examples/1.8.x/console-cli/examples/users/delete-identity.md new file mode 100644 index 0000000000..f3d2d6d980 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-identity.md @@ -0,0 +1,2 @@ +appwrite users deleteIdentity \ + --identityId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..edc67d0b9a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite users deleteMfaAuthenticator \ + --userId \ + --type totp diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-session.md b/docs/examples/1.8.x/console-cli/examples/users/delete-session.md new file mode 100644 index 0000000000..9f1fbdbfb3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-session.md @@ -0,0 +1,3 @@ +appwrite users deleteSession \ + --userId \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-sessions.md b/docs/examples/1.8.x/console-cli/examples/users/delete-sessions.md new file mode 100644 index 0000000000..4c683d270a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-sessions.md @@ -0,0 +1,2 @@ +appwrite users deleteSessions \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-target.md b/docs/examples/1.8.x/console-cli/examples/users/delete-target.md new file mode 100644 index 0000000000..e9780911fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-target.md @@ -0,0 +1,3 @@ +appwrite users deleteTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete.md b/docs/examples/1.8.x/console-cli/examples/users/delete.md new file mode 100644 index 0000000000..293a5b040d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete.md @@ -0,0 +1,2 @@ +appwrite users delete \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..cefcce607a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users getMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-prefs.md b/docs/examples/1.8.x/console-cli/examples/users/get-prefs.md new file mode 100644 index 0000000000..324aa4f508 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-prefs.md @@ -0,0 +1,2 @@ +appwrite users getPrefs \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-target.md b/docs/examples/1.8.x/console-cli/examples/users/get-target.md new file mode 100644 index 0000000000..b80dbd9728 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-target.md @@ -0,0 +1,3 @@ +appwrite users getTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-usage.md b/docs/examples/1.8.x/console-cli/examples/users/get-usage.md new file mode 100644 index 0000000000..ad7895d3aa --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-usage.md @@ -0,0 +1,2 @@ +appwrite users getUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/get.md b/docs/examples/1.8.x/console-cli/examples/users/get.md new file mode 100644 index 0000000000..47002c5063 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get.md @@ -0,0 +1,2 @@ +appwrite users get \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-identities.md b/docs/examples/1.8.x/console-cli/examples/users/list-identities.md new file mode 100644 index 0000000000..c6cd6d5e28 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-identities.md @@ -0,0 +1,3 @@ +appwrite users listIdentities \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-logs.md b/docs/examples/1.8.x/console-cli/examples/users/list-logs.md new file mode 100644 index 0000000000..0b0bc1f50f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-logs.md @@ -0,0 +1,3 @@ +appwrite users listLogs \ + --userId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-memberships.md b/docs/examples/1.8.x/console-cli/examples/users/list-memberships.md new file mode 100644 index 0000000000..119f446ec9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-memberships.md @@ -0,0 +1,4 @@ +appwrite users listMemberships \ + --userId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/console-cli/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..e5d111b8ee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-mfa-factors.md @@ -0,0 +1,2 @@ +appwrite users listMfaFactors \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-sessions.md b/docs/examples/1.8.x/console-cli/examples/users/list-sessions.md new file mode 100644 index 0000000000..cb85d15ff6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-sessions.md @@ -0,0 +1,2 @@ +appwrite users listSessions \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-targets.md b/docs/examples/1.8.x/console-cli/examples/users/list-targets.md new file mode 100644 index 0000000000..9b5614bd32 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-targets.md @@ -0,0 +1,3 @@ +appwrite users listTargets \ + --userId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list.md b/docs/examples/1.8.x/console-cli/examples/users/list.md new file mode 100644 index 0000000000..e5fdb9e5c5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list.md @@ -0,0 +1,3 @@ +appwrite users list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-email-verification.md b/docs/examples/1.8.x/console-cli/examples/users/update-email-verification.md new file mode 100644 index 0000000000..990436f38b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-email-verification.md @@ -0,0 +1,3 @@ +appwrite users updateEmailVerification \ + --userId \ + --emailVerification false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-email.md b/docs/examples/1.8.x/console-cli/examples/users/update-email.md new file mode 100644 index 0000000000..cce20e9ebf --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-email.md @@ -0,0 +1,3 @@ +appwrite users updateEmail \ + --userId \ + --email email@example.com diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-labels.md b/docs/examples/1.8.x/console-cli/examples/users/update-labels.md new file mode 100644 index 0000000000..ca60c59683 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-labels.md @@ -0,0 +1,3 @@ +appwrite users updateLabels \ + --userId \ + --labels one two three diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..63fb7f25eb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users updateMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-mfa.md b/docs/examples/1.8.x/console-cli/examples/users/update-mfa.md new file mode 100644 index 0000000000..3ccdbd8fdf --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-mfa.md @@ -0,0 +1,3 @@ +appwrite users updateMfa \ + --userId \ + --mfa false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-name.md b/docs/examples/1.8.x/console-cli/examples/users/update-name.md new file mode 100644 index 0000000000..9bf20eb117 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-name.md @@ -0,0 +1,3 @@ +appwrite users updateName \ + --userId \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-password.md b/docs/examples/1.8.x/console-cli/examples/users/update-password.md new file mode 100644 index 0000000000..c05197b3c2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-password.md @@ -0,0 +1,3 @@ +appwrite users updatePassword \ + --userId \ + --password '' diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-phone-verification.md b/docs/examples/1.8.x/console-cli/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..b88a282d48 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite users updatePhoneVerification \ + --userId \ + --phoneVerification false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-phone.md b/docs/examples/1.8.x/console-cli/examples/users/update-phone.md new file mode 100644 index 0000000000..118c8e3557 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-phone.md @@ -0,0 +1,3 @@ +appwrite users updatePhone \ + --userId \ + --number +12065550100 diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-prefs.md b/docs/examples/1.8.x/console-cli/examples/users/update-prefs.md new file mode 100644 index 0000000000..f3fa995e4d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-prefs.md @@ -0,0 +1,3 @@ +appwrite users updatePrefs \ + --userId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-status.md b/docs/examples/1.8.x/console-cli/examples/users/update-status.md new file mode 100644 index 0000000000..b587b70e9e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-status.md @@ -0,0 +1,3 @@ +appwrite users updateStatus \ + --userId \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-target.md b/docs/examples/1.8.x/console-cli/examples/users/update-target.md new file mode 100644 index 0000000000..d6541a0600 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-target.md @@ -0,0 +1,6 @@ +appwrite users updateTarget \ + --userId \ + --targetId \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/create-repository-detection.md b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..d12a093d2d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository-detection.md @@ -0,0 +1,5 @@ +appwrite vcs createRepositoryDetection \ + --installationId \ + --providerRepositoryId \ + --type runtime \ + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/create-repository.md b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository.md new file mode 100644 index 0000000000..a4934d5ef5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository.md @@ -0,0 +1,4 @@ +appwrite vcs createRepository \ + --installationId \ + --name \ + --private false diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/delete-installation.md b/docs/examples/1.8.x/console-cli/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..f7d3a92001 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/delete-installation.md @@ -0,0 +1,2 @@ +appwrite vcs deleteInstallation \ + --installationId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/get-installation.md b/docs/examples/1.8.x/console-cli/examples/vcs/get-installation.md new file mode 100644 index 0000000000..df51853ea4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/get-installation.md @@ -0,0 +1,2 @@ +appwrite vcs getInstallation \ + --installationId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/get-repository-contents.md b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository-contents.md new file mode 100644 index 0000000000..3ba8d75c91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository-contents.md @@ -0,0 +1,5 @@ +appwrite vcs getRepositoryContents \ + --installationId \ + --providerRepositoryId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/get-repository.md b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository.md new file mode 100644 index 0000000000..9f88e18eef --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository.md @@ -0,0 +1,3 @@ +appwrite vcs getRepository \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/list-installations.md b/docs/examples/1.8.x/console-cli/examples/vcs/list-installations.md new file mode 100644 index 0000000000..a0af28dfbb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/list-installations.md @@ -0,0 +1,3 @@ +appwrite vcs listInstallations \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/list-repositories.md b/docs/examples/1.8.x/console-cli/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..15c3a643bb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/list-repositories.md @@ -0,0 +1,4 @@ +appwrite vcs listRepositories \ + --installationId \ + --type runtime \ + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/list-repository-branches.md b/docs/examples/1.8.x/console-cli/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..ea2fbd29fb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/list-repository-branches.md @@ -0,0 +1,3 @@ +appwrite vcs listRepositoryBranches \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/update-external-deployments.md b/docs/examples/1.8.x/console-cli/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..417b59431d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/update-external-deployments.md @@ -0,0 +1,4 @@ +appwrite vcs updateExternalDeployments \ + --installationId \ + --repositoryId \ + --providerPullRequestId diff --git a/docs/examples/1.8.x/console-web/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/console-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..113f882e80 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md b/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..36a503164b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-email-token.md b/docs/examples/1.8.x/console-web/examples/account/create-email-token.md new file mode 100644 index 0000000000..9517000af3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..9fc0e6da5e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..6b1891855e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..923eb1ee3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..fd6af6ec19 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..d7c122b79c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..a11bd9880b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..9eb7cfab67 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md new file mode 100644 index 0000000000..25216ca73c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-phone-verification.md b/docs/examples/1.8.x/console-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..03185e3e91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-push-target.md b/docs/examples/1.8.x/console-web/examples/account/create-push-target.md new file mode 100644 index 0000000000..ee35566f8a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-recovery.md b/docs/examples/1.8.x/console-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..c2bb4422fa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-session.md b/docs/examples/1.8.x/console-web/examples/account/create-session.md new file mode 100644 index 0000000000..1c8d8a4480 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-verification.md b/docs/examples/1.8.x/console-web/examples/account/create-verification.md new file mode 100644 index 0000000000..f6eacdce1f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create.md b/docs/examples/1.8.x/console-web/examples/account/create.md new file mode 100644 index 0000000000..d220aed8d0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-identity.md b/docs/examples/1.8.x/console-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..6808b32a1d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..54610a810c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md b/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md new file mode 100644 index 0000000000..f530b64dad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-session.md b/docs/examples/1.8.x/console-web/examples/account/delete-session.md new file mode 100644 index 0000000000..4eba0515e4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-sessions.md b/docs/examples/1.8.x/console-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b9904d612f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete.md b/docs/examples/1.8.x/console-web/examples/account/delete.md new file mode 100644 index 0000000000..2fc730f9f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.delete(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..bee039c48d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get-prefs.md b/docs/examples/1.8.x/console-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..3a013e6615 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get-session.md b/docs/examples/1.8.x/console-web/examples/account/get-session.md new file mode 100644 index 0000000000..d5da237783 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get.md b/docs/examples/1.8.x/console-web/examples/account/get.md new file mode 100644 index 0000000000..35661e483b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-identities.md b/docs/examples/1.8.x/console-web/examples/account/list-identities.md new file mode 100644 index 0000000000..675e902c9f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-logs.md b/docs/examples/1.8.x/console-web/examples/account/list-logs.md new file mode 100644 index 0000000000..72a0ee12dd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/console-web/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..7cbc52ec71 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-sessions.md b/docs/examples/1.8.x/console-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..6a24e372c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-email.md b/docs/examples/1.8.x/console-web/examples/account/update-email.md new file mode 100644 index 0000000000..df1c7f480a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md b/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..b813b60bb4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..e0ecd66740 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b960675914 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..5314959f25 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..654d9fb0fa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-name.md b/docs/examples/1.8.x/console-web/examples/account/update-name.md new file mode 100644 index 0000000000..cd36ece113 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-password.md b/docs/examples/1.8.x/console-web/examples/account/update-password.md new file mode 100644 index 0000000000..863c5f28b3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md b/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..d23c10bbda --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md b/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..1a05386a9d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone.md b/docs/examples/1.8.x/console-web/examples/account/update-phone.md new file mode 100644 index 0000000000..380279d057 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-prefs.md b/docs/examples/1.8.x/console-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..13d857468d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-push-target.md b/docs/examples/1.8.x/console-web/examples/account/update-push-target.md new file mode 100644 index 0000000000..566d754db7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-recovery.md b/docs/examples/1.8.x/console-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..53d75f95d2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-session.md b/docs/examples/1.8.x/console-web/examples/account/update-session.md new file mode 100644 index 0000000000..207fc026d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-status.md b/docs/examples/1.8.x/console-web/examples/account/update-status.md new file mode 100644 index 0000000000..c1377dc4a6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-verification.md b/docs/examples/1.8.x/console-web/examples/account/update-verification.md new file mode 100644 index 0000000000..4861ca2b81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/assistant/chat.md b/docs/examples/1.8.x/console-web/examples/assistant/chat.md new file mode 100644 index 0000000000..98032043a5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/assistant/chat.md @@ -0,0 +1,13 @@ +import { Client, Assistant } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const assistant = new Assistant(client); + +const result = await assistant.chat( + '' // prompt +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md b/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..65e7c826ff --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..bda5407b27 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md b/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..b23e99a551 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md b/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..f6c0814abd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-image.md b/docs/examples/1.8.x/console-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..209e1ea836 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md b/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..6ec70b2143 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md b/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..a255cdc531 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/console/get-resource.md b/docs/examples/1.8.x/console-web/examples/console/get-resource.md new file mode 100644 index 0000000000..94a4707081 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/console/get-resource.md @@ -0,0 +1,14 @@ +import { Client, Console, ConsoleResourceType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.getResource( + '', // value + ConsoleResourceType.Rules // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/console/variables.md b/docs/examples/1.8.x/console-web/examples/console/variables.md new file mode 100644 index 0000000000..1dce6c0260 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/console/variables.md @@ -0,0 +1,11 @@ +import { Client, Console } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.variables(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..5b161c6f51 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-collection.md b/docs/examples/1.8.x/console-web/examples/databases/create-collection.md new file mode 100644 index 0000000000..cd28cf8616 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..c431105bdf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-document.md b/docs/examples/1.8.x/console-web/examples/databases/create-document.md new file mode 100644 index 0000000000..4524017dd5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-document.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('') // Your secret API key + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md new file mode 100644 index 0000000000..f7ffbe809c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // Your secret API key + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..f11c1a9649 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d180b1b9f2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..036d3fc201 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-index.md b/docs/examples/1.8.x/console-web/examples/databases/create-index.md new file mode 100644 index 0000000000..6a35f55349 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-index.md @@ -0,0 +1,19 @@ +import { Client, Databases, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIndex( + '', // databaseId + '', // collectionId + '', // key + IndexType.Key, // type + [], // attributes + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..25f474d0aa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..e8abc80f91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..358a2df5fc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // relatedCollectionId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..ba94b0348b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createStringAttribute( + '', // databaseId + '', // collectionId + '', // key + 1, // size + false, // required + '', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..da80e392d3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create.md b/docs/examples/1.8.x/console-web/examples/databases/create.md new file mode 100644 index 0000000000..6d709ddd56 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.create( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..f090f53b49 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.decrementDocumentAttribute( + '', // databaseId + '', // collectionId + '', // documentId + '', // attribute + null, // value (optional) + null // min (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..df12b0d2f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md b/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md new file mode 100644 index 0000000000..f490ae1096 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-document.md b/docs/examples/1.8.x/console-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..a56a4f23c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md b/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md new file mode 100644 index 0000000000..ec520c6cf9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-index.md b/docs/examples/1.8.x/console-web/examples/databases/delete-index.md new file mode 100644 index 0000000000..cdd96a31f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete.md b/docs/examples/1.8.x/console-web/examples/databases/delete.md new file mode 100644 index 0000000000..3bd69657f9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.delete( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md new file mode 100644 index 0000000000..9dac2ad133 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..a2f736377a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md @@ -0,0 +1,15 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollectionUsage( + '', // databaseId + '', // collectionId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-collection.md b/docs/examples/1.8.x/console-web/examples/databases/get-collection.md new file mode 100644 index 0000000000..56d29f05cb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..13038ab755 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md @@ -0,0 +1,14 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDatabaseUsage( + '', // databaseId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-document.md b/docs/examples/1.8.x/console-web/examples/databases/get-document.md new file mode 100644 index 0000000000..0e90cf785e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-index.md b/docs/examples/1.8.x/console-web/examples/databases/get-index.md new file mode 100644 index 0000000000..4c8c3794af --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md new file mode 100644 index 0000000000..a0dd3ce983 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getUsage( + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get.md b/docs/examples/1.8.x/console-web/examples/databases/get.md new file mode 100644 index 0000000000..5c72c5639c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.get( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..62ebd6fe3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.incrementDocumentAttribute( + '', // databaseId + '', // collectionId + '', // documentId + '', // attribute + null, // value (optional) + null // max (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md b/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md new file mode 100644 index 0000000000..0c2cd4092c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listAttributes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..b2ef92d677 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollectionLogs( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-collections.md b/docs/examples/1.8.x/console-web/examples/databases/list-collections.md new file mode 100644 index 0000000000..f9a0511e3e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollections( + '', // databaseId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..ddb789b3f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocumentLogs( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-documents.md b/docs/examples/1.8.x/console-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..3a77c05faa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md b/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md new file mode 100644 index 0000000000..fbbef1a9d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listIndexes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-logs.md new file mode 100644 index 0000000000..12ccccf87e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listLogs( + '', // databaseId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-usage.md b/docs/examples/1.8.x/console-web/examples/databases/list-usage.md new file mode 100644 index 0000000000..1be9949a84 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listUsage( + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-usages.md b/docs/examples/1.8.x/console-web/examples/databases/list-usages.md new file mode 100644 index 0000000000..5832c387bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-usages.md @@ -0,0 +1,13 @@ +import { Client, Databases, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listUsages( + .24h // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list.md b/docs/examples/1.8.x/console-web/examples/databases/list.md new file mode 100644 index 0000000000..58ec7209a3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..95207fd2ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-collection.md b/docs/examples/1.8.x/console-web/examples/databases/update-collection.md new file mode 100644 index 0000000000..ced992baf4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..7c413ee532 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-document.md b/docs/examples/1.8.x/console-web/examples/databases/update-document.md new file mode 100644 index 0000000000..85898ea2a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-documents.md b/docs/examples/1.8.x/console-web/examples/databases/update-documents.md new file mode 100644 index 0000000000..67be1e405c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocuments( + '', // databaseId + '', // collectionId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..e54dba99bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..aa5330af04 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..344ddb8815 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..72565bd5f4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..ff6dded552 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..acce3fd741 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..05601bd4a2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateStringAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..78b4d92a28 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update.md b/docs/examples/1.8.x/console-web/examples/databases/update.md new file mode 100644 index 0000000000..a29475b816 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.update( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md new file mode 100644 index 0000000000..6d92656543 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('') // Your secret API key + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..519b0ec160 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // Your secret API key + +const databases = new Databases(client); + +const result = await databases.upsertDocuments( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md new file mode 100644 index 0000000000..62309d5e98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDeployment( + '', // functionId + document.getElementById('uploader').files[0], // code + false, // activate + '', // entrypoint (optional) + '' // commands (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..1b48c27a6f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDuplicateDeployment( + '', // functionId + '', // deploymentId + '' // buildId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..813e1fd0a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..98bf957eb1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createTemplateDeployment( + '', // functionId + '', // repository + '', // owner + '', // rootDirectory + '', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-variable.md b/docs/examples/1.8.x/console-web/examples/functions/create-variable.md new file mode 100644 index 0000000000..0b562cb93d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVariable( + '', // functionId + '', // key + '', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..6a12653de4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Functions, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVcsDeployment( + '', // functionId + VCSDeploymentType.Branch, // type + '', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create.md b/docs/examples/1.8.x/console-web/examples/functions/create.md new file mode 100644 index 0000000000..1d9915f978 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.create( + '', // functionId + '', // name + .Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..1bc26feab0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md b/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md new file mode 100644 index 0000000000..0816434637 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md b/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md new file mode 100644 index 0000000000..878d15d235 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete.md b/docs/examples/1.8.x/console-web/examples/functions/delete.md new file mode 100644 index 0000000000..86d616d267 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.delete( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..1ad8fd30cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Functions, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = functions.getDeploymentDownload( + '', // functionId + '', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md new file mode 100644 index 0000000000..75cb11f741 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-execution.md b/docs/examples/1.8.x/console-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..58ab917bbd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-template.md b/docs/examples/1.8.x/console-web/examples/functions/get-template.md new file mode 100644 index 0000000000..13c95210ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-template.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getTemplate( + '' // templateId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-usage.md b/docs/examples/1.8.x/console-web/examples/functions/get-usage.md new file mode 100644 index 0000000000..bc010c3bd9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getUsage( + '', // functionId + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-variable.md b/docs/examples/1.8.x/console-web/examples/functions/get-variable.md new file mode 100644 index 0000000000..d80b2bccbf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get.md b/docs/examples/1.8.x/console-web/examples/functions/get.md new file mode 100644 index 0000000000..9b852849eb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.get( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md b/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md new file mode 100644 index 0000000000..b9f2ec0eaf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listDeployments( + '', // functionId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-executions.md b/docs/examples/1.8.x/console-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..7d8a6c7a98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-runtimes.md b/docs/examples/1.8.x/console-web/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..cdd1e08cad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listRuntimes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-specifications.md b/docs/examples/1.8.x/console-web/examples/functions/list-specifications.md new file mode 100644 index 0000000000..fe671c54bb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-templates.md b/docs/examples/1.8.x/console-web/examples/functions/list-templates.md new file mode 100644 index 0000000000..ab7f84b34d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listTemplates( + [], // runtimes (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-usage.md b/docs/examples/1.8.x/console-web/examples/functions/list-usage.md new file mode 100644 index 0000000000..14a880692b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listUsage( + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-variables.md b/docs/examples/1.8.x/console-web/examples/functions/list-variables.md new file mode 100644 index 0000000000..5651dbd1c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listVariables( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list.md b/docs/examples/1.8.x/console-web/examples/functions/list.md new file mode 100644 index 0000000000..462214449d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..ba4f37fabf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateDeploymentStatus( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..2d714fb43c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateFunctionDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-variable.md b/docs/examples/1.8.x/console-web/examples/functions/update-variable.md new file mode 100644 index 0000000000..a6be7c0dd2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateVariable( + '', // functionId + '', // variableId + '', // key + '', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update.md b/docs/examples/1.8.x/console-web/examples/functions/update.md new file mode 100644 index 0000000000..66d3cd8e8f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.update( + '', // functionId + '', // name + .Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/graphql/mutation.md b/docs/examples/1.8.x/console-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..5360139b07 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/graphql/query.md b/docs/examples/1.8.x/console-web/examples/graphql/query.md new file mode 100644 index 0000000000..15434872ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-antivirus.md b/docs/examples/1.8.x/console-web/examples/health/get-antivirus.md new file mode 100644 index 0000000000..30e142a63d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getAntivirus(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-cache.md b/docs/examples/1.8.x/console-web/examples/health/get-cache.md new file mode 100644 index 0000000000..1c0bb182e2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCache(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-certificate.md b/docs/examples/1.8.x/console-web/examples/health/get-certificate.md new file mode 100644 index 0000000000..288c0f8732 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCertificate( + '' // domain (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-d-b.md b/docs/examples/1.8.x/console-web/examples/health/get-d-b.md new file mode 100644 index 0000000000..855e73466c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getDB(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..d96a5545aa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md @@ -0,0 +1,14 @@ +import { Client, Health, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getFailedJobs( + .V1Database, // name + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-pub-sub.md b/docs/examples/1.8.x/console-web/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..0ccce8e4d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getPubSub(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..dfbbfd91a6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueBuilds( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..b0397f4422 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueCertificates( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..1b958a9c75 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDatabases( + '', // name (optional) + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..3f34bc2228 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDeletes( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..2ea3701462 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueFunctions( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..73bd18589a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueLogs( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..a6d86c04c7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMails( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..d25979713d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMessaging( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..3619c56028 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMigrations( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..cf1c3ee5df --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueStatsResources( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..f79fd3b5ad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueUsage( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..72bcc44c9a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueWebhooks( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-storage-local.md b/docs/examples/1.8.x/console-web/examples/health/get-storage-local.md new file mode 100644 index 0000000000..e6bdf62c50 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorageLocal(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-storage.md b/docs/examples/1.8.x/console-web/examples/health/get-storage.md new file mode 100644 index 0000000000..1d8941490e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-storage.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorage(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-time.md b/docs/examples/1.8.x/console-web/examples/health/get-time.md new file mode 100644 index 0000000000..826eaf5a8c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-time.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getTime(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get.md b/docs/examples/1.8.x/console-web/examples/health/get.md new file mode 100644 index 0000000000..b510d8a891 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/get.md b/docs/examples/1.8.x/console-web/examples/locale/get.md new file mode 100644 index 0000000000..4b0331787e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-codes.md b/docs/examples/1.8.x/console-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..d20399af4a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-continents.md b/docs/examples/1.8.x/console-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..d769e88f1c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..ce8746421b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/console-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..457867707c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-countries.md b/docs/examples/1.8.x/console-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..298e25ee81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-currencies.md b/docs/examples/1.8.x/console-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..05ff041cbb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-languages.md b/docs/examples/1.8.x/console-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..1a2db31b55 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..9b238afc9e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createApnsProvider( + '', // providerId + '', // name + '', // authKey (optional) + '', // authKeyId (optional) + '', // teamId (optional) + '', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-email.md b/docs/examples/1.8.x/console-web/examples/messaging/create-email.md new file mode 100644 index 0000000000..108517c89d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createEmail( + '', // messageId + '', // subject + '', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..9d67e89fd6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createFcmProvider( + '', // providerId + '', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..dc165af859 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMailgunProvider( + '', // providerId + '', // name + '', // apiKey (optional) + '', // domain (optional) + false, // isEuRegion (optional) + '', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..cab468a089 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMsg91Provider( + '', // providerId + '', // name + '', // templateId (optional) + '', // senderId (optional) + '', // authKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-push.md b/docs/examples/1.8.x/console-web/examples/messaging/create-push.md new file mode 100644 index 0000000000..79c3a20e83 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createPush( + '', // messageId + '', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..b93c84b258 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md b/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md new file mode 100644 index 0000000000..7146ee4ac9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..b4bcf14d0b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..b1f7239413 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..355bc22f85 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..d79cffc316 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md new file mode 100644 index 0000000000..274714a63b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..9b8f440743 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..6e115e8eb9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..f71eb65f29 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ace9670211 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..8f8e5460d3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete.md b/docs/examples/1.8.x/console-web/examples/messaging/delete.md new file mode 100644 index 0000000000..17324cca7e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.delete( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-message.md b/docs/examples/1.8.x/console-web/examples/messaging/get-message.md new file mode 100644 index 0000000000..3282adbe57 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md new file mode 100644 index 0000000000..97ac5fd127 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..b718558d71 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md new file mode 100644 index 0000000000..802ec1fba4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..8679b267ce --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md b/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md new file mode 100644 index 0000000000..a537844f81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..2e4acb38cf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md b/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md new file mode 100644 index 0000000000..5c91f01bbc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..f722c9a9ed --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..f120e9d96d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md b/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md new file mode 100644 index 0000000000..89baf87cb0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..bc23a09a91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md b/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md new file mode 100644 index 0000000000..d23cca3171 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..bc69c3ad1e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-email.md b/docs/examples/1.8.x/console-web/examples/messaging/update-email.md new file mode 100644 index 0000000000..ba9bc7eb48 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..d2e7382561 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..cc48ac52f3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..c2a6faec24 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-push.md b/docs/examples/1.8.x/console-web/examples/messaging/update-push.md new file mode 100644 index 0000000000..e479dcc425 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..efe8263718 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md b/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md new file mode 100644 index 0000000000..2c535a014e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..0274337a7b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..5d8bc1602d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..564ad4fc69 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md new file mode 100644 index 0000000000..e0edbae714 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..544a52e4fd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..e831c03184 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..db9a4cd0e0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createAppwriteMigration( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectId + '<API_KEY>' // apiKey +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md new file mode 100644 index 0000000000..544f6c8ef6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md @@ -0,0 +1,15 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createCsvMigration( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '[ID1:ID2]' // resourceId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..20ce3a8b3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createFirebaseMigration( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..23b22ff371 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createNHostMigration( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..18c326ca7e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createSupabaseMigration( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/delete.md b/docs/examples/1.8.x/console-web/examples/migrations/delete.md new file mode 100644 index 0000000000..bb013ddf27 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/delete.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.delete( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..a70b6a45fb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getAppwriteReport( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectID + '<KEY>' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..bf1c85eeb6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getFirebaseReport( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..a983088f0d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getNHostReport( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..d6ea7a9712 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getSupabaseReport( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get.md b/docs/examples/1.8.x/console-web/examples/migrations/get.md new file mode 100644 index 0000000000..e2c67eb884 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.get( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/list.md b/docs/examples/1.8.x/console-web/examples/migrations/list.md new file mode 100644 index 0000000000..a978e1843e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/list.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/retry.md b/docs/examples/1.8.x/console-web/examples/migrations/retry.md new file mode 100644 index 0000000000..f489168d7e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/retry.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.retry( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/create-variable.md b/docs/examples/1.8.x/console-web/examples/project/create-variable.md new file mode 100644 index 0000000000..aa7361ffc2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.createVariable( + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/delete-variable.md b/docs/examples/1.8.x/console-web/examples/project/delete-variable.md new file mode 100644 index 0000000000..224691691d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.deleteVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/get-usage.md b/docs/examples/1.8.x/console-web/examples/project/get-usage.md new file mode 100644 index 0000000000..300311dd8f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/get-usage.md @@ -0,0 +1,15 @@ +import { Client, Project, ProjectUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getUsage( + '', // startDate + '', // endDate + ProjectUsageRange.OneHour // period (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/get-variable.md b/docs/examples/1.8.x/console-web/examples/project/get-variable.md new file mode 100644 index 0000000000..bc30baa325 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/list-variables.md b/docs/examples/1.8.x/console-web/examples/project/list-variables.md new file mode 100644 index 0000000000..9c17f8514e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/list-variables.md @@ -0,0 +1,11 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.listVariables(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/update-variable.md b/docs/examples/1.8.x/console-web/examples/project/update-variable.md new file mode 100644 index 0000000000..9dcd62a7c2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.updateVariable( + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md new file mode 100644 index 0000000000..28f89aea49 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md @@ -0,0 +1,15 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createDevKey( + '<PROJECT_ID>', // projectId + '<NAME>', // name + '' // expire +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md new file mode 100644 index 0000000000..7175e266ae --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createJWT( + '<PROJECT_ID>', // projectId + [], // scopes + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-key.md b/docs/examples/1.8.x/console-web/examples/projects/create-key.md new file mode 100644 index 0000000000..25bcc125ed --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-key.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createKey( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-platform.md b/docs/examples/1.8.x/console-web/examples/projects/create-platform.md new file mode 100644 index 0000000000..7e23dd6f9e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects, PlatformType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createPlatform( + '<PROJECT_ID>', // projectId + PlatformType.Web, // type + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md b/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md new file mode 100644 index 0000000000..ab0e184432 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createSmtpTest( + '<PROJECT_ID>', // projectId + [], // emails + '<SENDER_NAME>', // senderName + 'email@example.com', // senderEmail + '', // host + 'email@example.com', // replyTo (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md new file mode 100644 index 0000000000..62fdac56cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md @@ -0,0 +1,20 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createWebhook( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create.md b/docs/examples/1.8.x/console-web/examples/projects/create.md new file mode 100644 index 0000000000..58efd0b75f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create.md @@ -0,0 +1,25 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.create( + '', // projectId + '<NAME>', // name + '<TEAM_ID>', // teamId + .Default, // region (optional) + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md new file mode 100644 index 0000000000..fc2ca4f1a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..10e3d302ae --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-key.md b/docs/examples/1.8.x/console-web/examples/projects/delete-key.md new file mode 100644 index 0000000000..7ea7dc6fdc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md b/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md new file mode 100644 index 0000000000..5c71747a64 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deletePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..eef3cccae9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..24abaafc66 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete.md b/docs/examples/1.8.x/console-web/examples/projects/delete.md new file mode 100644 index 0000000000..d868616db2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.delete( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md new file mode 100644 index 0000000000..a9c38df45a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md new file mode 100644 index 0000000000..1d27c8c682 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-key.md b/docs/examples/1.8.x/console-web/examples/projects/get-key.md new file mode 100644 index 0000000000..79359e298b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-platform.md b/docs/examples/1.8.x/console-web/examples/projects/get-platform.md new file mode 100644 index 0000000000..a17bcb122d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getPlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..0badf1cca4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md new file mode 100644 index 0000000000..6b6530a04e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get.md b/docs/examples/1.8.x/console-web/examples/projects/get.md new file mode 100644 index 0000000000..dbec5dd543 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.get( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md b/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md new file mode 100644 index 0000000000..d3b17706cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listDevKeys( + '<PROJECT_ID>', // projectId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-keys.md b/docs/examples/1.8.x/console-web/examples/projects/list-keys.md new file mode 100644 index 0000000000..5701133ba4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-keys.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listKeys( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md b/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md new file mode 100644 index 0000000000..214092b6b3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listPlatforms( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md b/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..11639bfccf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listWebhooks( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list.md b/docs/examples/1.8.x/console-web/examples/projects/list.md new file mode 100644 index 0000000000..0ade65189a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md b/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md new file mode 100644 index 0000000000..a51ed2df2b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md new file mode 100644 index 0000000000..9cc7dfe8ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatus( + '<PROJECT_ID>', // projectId + .Rest, // api + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..d0d8c67b28 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthDuration( + '<PROJECT_ID>', // projectId + 0 // duration +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..80f73f871f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthLimit( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..1e878c2246 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordDictionary( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..26a3adcfde --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordHistory( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..c1b0e14e91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthSessionsLimit( + '<PROJECT_ID>', // projectId + 1 // limit +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..d4862282a6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, AuthMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthStatus( + '<PROJECT_ID>', // projectId + AuthMethod.EmailPassword, // method + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md new file mode 100644 index 0000000000..9c00474262 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>', // keyId + '<NAME>', // name + '' // expire +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md new file mode 100644 index 0000000000..44467c4f8a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md @@ -0,0 +1,20 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af, // locale + '<SUBJECT>', // subject + '<MESSAGE>', // message + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com' // replyTo (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-key.md b/docs/examples/1.8.x/console-web/examples/projects/update-key.md new file mode 100644 index 0000000000..492a0ac23d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-key.md @@ -0,0 +1,17 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>', // keyId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md b/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..31adcd3855 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMembershipsPrivacy( + '<PROJECT_ID>', // projectId + false, // userName + false, // userEmail + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md b/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md new file mode 100644 index 0000000000..245a20c19b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMockNumbers( + '<PROJECT_ID>', // projectId + [] // numbers +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..0671ee38bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md @@ -0,0 +1,17 @@ +import { Client, Projects, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateOAuth2( + '<PROJECT_ID>', // projectId + OAuthProvider.Amazon, // provider + '<APP_ID>', // appId (optional) + '<SECRET>', // secret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md b/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..fb0fcffc16 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePersonalDataCheck( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-platform.md b/docs/examples/1.8.x/console-web/examples/projects/update-platform.md new file mode 100644 index 0000000000..2f9cc0a4fd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>', // platformId + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md b/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..672a1491bc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md new file mode 100644 index 0000000000..5d2189e339 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, ApiService } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatus( + '<PROJECT_ID>', // projectId + ApiService.Account, // service + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md b/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md new file mode 100644 index 0000000000..65aa353b2b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSessionAlerts( + '<PROJECT_ID>', // projectId + false // alerts +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md b/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md new file mode 100644 index 0000000000..b0e3ad3e0f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSessionInvalidation( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..cc801a67c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md @@ -0,0 +1,16 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af, // locale + '<MESSAGE>' // message +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md b/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md new file mode 100644 index 0000000000..605ba0f5e3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmtp( + '<PROJECT_ID>', // projectId + false, // enabled + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com', // replyTo (optional) + '', // host (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-team.md b/docs/examples/1.8.x/console-web/examples/projects/update-team.md new file mode 100644 index 0000000000..b7c5d934e2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-team.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateTeam( + '<PROJECT_ID>', // projectId + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md b/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..593c6c0fce --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhookSignature( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md new file mode 100644 index 0000000000..18d10051e9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md @@ -0,0 +1,21 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>', // webhookId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update.md b/docs/examples/1.8.x/console-web/examples/projects/update.md new file mode 100644 index 0000000000..8b2d2823ca --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update.md @@ -0,0 +1,23 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.update( + '<PROJECT_ID>', // projectId + '<NAME>', // name + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 0000000000..e248ebea3d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createAPIRule( + '' // domain +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md new file mode 100644 index 0000000000..2bb0b83f08 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createFunctionRule( + '', // domain + '<FUNCTION_ID>', // functionId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md new file mode 100644 index 0000000000..294e496987 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md @@ -0,0 +1,17 @@ +import { Client, Proxy, , ProxyResourceType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createRedirectRule( + '', // domain + 'https://example.com', // url + .MovedPermanently301, // statusCode + '<RESOURCE_ID>', // resourceId + ProxyResourceType.Site // resourceType +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md new file mode 100644 index 0000000000..4ea806eceb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createSiteRule( + '', // domain + '<SITE_ID>', // siteId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..783f06d95c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.deleteRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md new file mode 100644 index 0000000000..e69c8210ce --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.getRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md b/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md new file mode 100644 index 0000000000..8c07168292 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md @@ -0,0 +1,14 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.listRules( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md b/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..349535cec8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.updateRuleVerification( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md new file mode 100644 index 0000000000..5bc597c20e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDeployment( + '<SITE_ID>', // siteId + document.getElementById('uploader').files[0], // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..3b8347fbf6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..990d7cf98b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-variable.md b/docs/examples/1.8.x/console-web/examples/sites/create-variable.md new file mode 100644 index 0000000000..d605f2e4aa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..dd595db14d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Sites, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create.md b/docs/examples/1.8.x/console-web/examples/sites/create.md new file mode 100644 index 0000000000..7880ba361b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + .Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..357b69c04e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-log.md b/docs/examples/1.8.x/console-web/examples/sites/delete-log.md new file mode 100644 index 0000000000..25defd1546 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md b/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md new file mode 100644 index 0000000000..f6201738d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete.md b/docs/examples/1.8.x/console-web/examples/sites/delete.md new file mode 100644 index 0000000000..e3eff9cbb9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.delete( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..17707eded0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Sites, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md new file mode 100644 index 0000000000..c3453446e8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-log.md b/docs/examples/1.8.x/console-web/examples/sites/get-log.md new file mode 100644 index 0000000000..eb1cd654c9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-template.md b/docs/examples/1.8.x/console-web/examples/sites/get-template.md new file mode 100644 index 0000000000..4220390d95 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-template.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getTemplate( + '<TEMPLATE_ID>' // templateId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-usage.md b/docs/examples/1.8.x/console-web/examples/sites/get-usage.md new file mode 100644 index 0000000000..582a754e07 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getUsage( + '<SITE_ID>', // siteId + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-variable.md b/docs/examples/1.8.x/console-web/examples/sites/get-variable.md new file mode 100644 index 0000000000..c0d95326cc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get.md b/docs/examples/1.8.x/console-web/examples/sites/get.md new file mode 100644 index 0000000000..102cade4c6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.get( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md b/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md new file mode 100644 index 0000000000..8c0bd8ea2d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-frameworks.md b/docs/examples/1.8.x/console-web/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..aceadcc8c9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listFrameworks(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-logs.md b/docs/examples/1.8.x/console-web/examples/sites/list-logs.md new file mode 100644 index 0000000000..458cc69b2b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-specifications.md b/docs/examples/1.8.x/console-web/examples/sites/list-specifications.md new file mode 100644 index 0000000000..9bbb35d76d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-templates.md b/docs/examples/1.8.x/console-web/examples/sites/list-templates.md new file mode 100644 index 0000000000..58f46bbb4a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listTemplates( + [], // frameworks (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-usage.md b/docs/examples/1.8.x/console-web/examples/sites/list-usage.md new file mode 100644 index 0000000000..7182d78880 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listUsage( + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-variables.md b/docs/examples/1.8.x/console-web/examples/sites/list-variables.md new file mode 100644 index 0000000000..de62195aea --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listVariables( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list.md b/docs/examples/1.8.x/console-web/examples/sites/list.md new file mode 100644 index 0000000000..fafe3cb229 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..8205c863b0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..d63541702e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-variable.md b/docs/examples/1.8.x/console-web/examples/sites/update-variable.md new file mode 100644 index 0000000000..1ea9481737 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update.md b/docs/examples/1.8.x/console-web/examples/sites/update.md new file mode 100644 index 0000000000..b20a19526d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Node145, // buildRuntime (optional) + .Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a01bb0945f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/create-file.md b/docs/examples/1.8.x/console-web/examples/storage/create-file.md new file mode 100644 index 0000000000..8048772389 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + document.getElementById('uploader').files[0], // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..20084fd7e3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/delete-file.md b/docs/examples/1.8.x/console-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..41afa9e375 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..1007454c2e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md @@ -0,0 +1,14 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucketUsage( + '<BUCKET_ID>', // bucketId + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md new file mode 100644 index 0000000000..ec77dd2bf5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..8e98105ef3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..b14a02769e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..03db75f044 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file.md b/docs/examples/1.8.x/console-web/examples/storage/get-file.md new file mode 100644 index 0000000000..76658edb0b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-usage.md b/docs/examples/1.8.x/console-web/examples/storage/get-usage.md new file mode 100644 index 0000000000..b57f8f8b03 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getUsage( + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md b/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md new file mode 100644 index 0000000000..f82c01a879 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/list-files.md b/docs/examples/1.8.x/console-web/examples/storage/list-files.md new file mode 100644 index 0000000000..9076b8997f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md new file mode 100644 index 0000000000..d6c125a213 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/update-file.md b/docs/examples/1.8.x/console-web/examples/storage/update-file.md new file mode 100644 index 0000000000..79830f77d2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..bf0cca08c1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..c9eb3af82c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md new file mode 100644 index 0000000000..3952161779 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..7b16da6c14 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md new file mode 100644 index 0000000000..6608864efe --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-index.md b/docs/examples/1.8.x/console-web/examples/tables/create-index.md new file mode 100644 index 0000000000..c303dd289d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-index.md @@ -0,0 +1,19 @@ +import { Client, Tables, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..0490b71189 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..644f520032 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..5658eec690 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md @@ -0,0 +1,20 @@ +import { Client, Tables, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-row.md b/docs/examples/1.8.x/console-web/examples/tables/create-row.md new file mode 100644 index 0000000000..ba18cb6fba --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-rows.md b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md new file mode 100644 index 0000000000..bd7f984ee3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md new file mode 100644 index 0000000000..6c1fbd7c99 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md new file mode 100644 index 0000000000..88e1fc584d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create.md b/docs/examples/1.8.x/console-web/examples/tables/create.md new file mode 100644 index 0000000000..a7bda74508 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..35cb78686c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-column.md b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md new file mode 100644 index 0000000000..642856448a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-index.md b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md new file mode 100644 index 0000000000..f517513909 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-row.md b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md new file mode 100644 index 0000000000..accbb3092a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md new file mode 100644 index 0000000000..adbb613a35 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete.md b/docs/examples/1.8.x/console-web/examples/tables/delete.md new file mode 100644 index 0000000000..f235d8dda0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-column.md b/docs/examples/1.8.x/console-web/examples/tables/get-column.md new file mode 100644 index 0000000000..7bd7f2db30 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-column.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-index.md b/docs/examples/1.8.x/console-web/examples/tables/get-index.md new file mode 100644 index 0000000000..dc8c3362cf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-index.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-row.md b/docs/examples/1.8.x/console-web/examples/tables/get-row.md new file mode 100644 index 0000000000..f37558d4ff --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md new file mode 100644 index 0000000000..4e6ca3270d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md @@ -0,0 +1,15 @@ +import { Client, Tables, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getTableUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + .24h // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md new file mode 100644 index 0000000000..0f9d31c92d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md @@ -0,0 +1,15 @@ +import { Client, Tables, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get.md b/docs/examples/1.8.x/console-web/examples/tables/get.md new file mode 100644 index 0000000000..2b8951582a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..ed9710a0e3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-columns.md b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md new file mode 100644 index 0000000000..91348c4e61 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0ae874663d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md new file mode 100644 index 0000000000..04d6c2300c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md new file mode 100644 index 0000000000..691e589a77 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRowLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-rows.md b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md new file mode 100644 index 0000000000..79f5e242a5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list.md b/docs/examples/1.8.x/console-web/examples/tables/list.md new file mode 100644 index 0000000000..e8eb3c3dd6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e4bb9012e6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..d24683aafb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md new file mode 100644 index 0000000000..b9e2483191 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..bfe084212c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md new file mode 100644 index 0000000000..9075e31e69 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..c45e4735a9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..f7cdb490dc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..192eac7175 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md @@ -0,0 +1,17 @@ +import { Client, Tables, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-row.md b/docs/examples/1.8.x/console-web/examples/tables/update-row.md new file mode 100644 index 0000000000..0db00657c2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-rows.md b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md new file mode 100644 index 0000000000..72b2244f75 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md new file mode 100644 index 0000000000..8f6b3b5dad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md new file mode 100644 index 0000000000..a2cb65d700 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update.md b/docs/examples/1.8.x/console-web/examples/tables/update.md new file mode 100644 index 0000000000..f0552604af --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f1cb65e675 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..2d818cdbca --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const result = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/create-membership.md b/docs/examples/1.8.x/console-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..18f6b0ab4d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/create.md b/docs/examples/1.8.x/console-web/examples/teams/create.md new file mode 100644 index 0000000000..a33e71ad5f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md b/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..a63ed46749 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/delete.md b/docs/examples/1.8.x/console-web/examples/teams/delete.md new file mode 100644 index 0000000000..e97cc05cc7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get-membership.md b/docs/examples/1.8.x/console-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..bc31ee1470 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md b/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..394848c5c3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get.md b/docs/examples/1.8.x/console-web/examples/teams/get.md new file mode 100644 index 0000000000..8c752a9828 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list-logs.md b/docs/examples/1.8.x/console-web/examples/teams/list-logs.md new file mode 100644 index 0000000000..004e627f0d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listLogs( + '<TEAM_ID>', // teamId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md b/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..22fb731175 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list.md b/docs/examples/1.8.x/console-web/examples/teams/list.md new file mode 100644 index 0000000000..c51dfaf389 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md b/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c8e608278e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-membership.md b/docs/examples/1.8.x/console-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..d3e0164a17 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-name.md b/docs/examples/1.8.x/console-web/examples/teams/update-name.md new file mode 100644 index 0000000000..43703d0c98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md b/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e0acff0a30 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md b/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..bac4863159 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/delete.md b/docs/examples/1.8.x/console-web/examples/tokens/delete.md new file mode 100644 index 0000000000..0a871d0fe4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.delete( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/get.md b/docs/examples/1.8.x/console-web/examples/tokens/get.md new file mode 100644 index 0000000000..ee83fb83c2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/get.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.get( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/list.md b/docs/examples/1.8.x/console-web/examples/tokens/list.md new file mode 100644 index 0000000000..33077e26dd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/list.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/update.md b/docs/examples/1.8.x/console-web/examples/tokens/update.md new file mode 100644 index 0000000000..ce3b80dd22 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/update.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.update( + '<TOKEN_ID>', // tokenId + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md b/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md new file mode 100644 index 0000000000..c190225d4b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..9c51181890 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..7d50fbce03 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md b/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..610f795ab0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..ea52af9cf8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..c9437c5c38 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..b70f09c133 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md @@ -0,0 +1,17 @@ +import { Client, Users, PasswordHash } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..c0a0435b67 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..f1cb93637a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-session.md b/docs/examples/1.8.x/console-web/examples/users/create-session.md new file mode 100644 index 0000000000..5393c4408d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-session.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSession( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-target.md b/docs/examples/1.8.x/console-web/examples/users/create-target.md new file mode 100644 index 0000000000..4c8eac9c45 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-target.md @@ -0,0 +1,18 @@ +import { Client, Users, MessagingProviderType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-token.md b/docs/examples/1.8.x/console-web/examples/users/create-token.md new file mode 100644 index 0000000000..58e8c9f035 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-token.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create.md b/docs/examples/1.8.x/console-web/examples/users/create.md new file mode 100644 index 0000000000..131ef1290c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-identity.md b/docs/examples/1.8.x/console-web/examples/users/delete-identity.md new file mode 100644 index 0000000000..cf7425c843 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..023686ae26 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Users, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-session.md b/docs/examples/1.8.x/console-web/examples/users/delete-session.md new file mode 100644 index 0000000000..ca6880431b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md b/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md new file mode 100644 index 0000000000..1137a8b29b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-target.md b/docs/examples/1.8.x/console-web/examples/users/delete-target.md new file mode 100644 index 0000000000..386d8a90b5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete.md b/docs/examples/1.8.x/console-web/examples/users/delete.md new file mode 100644 index 0000000000..1d4b1d0e1c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.delete( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..02d17649c8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-prefs.md b/docs/examples/1.8.x/console-web/examples/users/get-prefs.md new file mode 100644 index 0000000000..b24f2bd3ae --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getPrefs( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-target.md b/docs/examples/1.8.x/console-web/examples/users/get-target.md new file mode 100644 index 0000000000..cfa7d3d5cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-usage.md b/docs/examples/1.8.x/console-web/examples/users/get-usage.md new file mode 100644 index 0000000000..bd87faf10f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Users, UserUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getUsage( + UserUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get.md b/docs/examples/1.8.x/console-web/examples/users/get.md new file mode 100644 index 0000000000..77f5006890 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.get( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-identities.md b/docs/examples/1.8.x/console-web/examples/users/list-identities.md new file mode 100644 index 0000000000..34b92900a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-identities.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-logs.md b/docs/examples/1.8.x/console-web/examples/users/list-logs.md new file mode 100644 index 0000000000..85e6cf5071 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-memberships.md b/docs/examples/1.8.x/console-web/examples/users/list-memberships.md new file mode 100644 index 0000000000..01ce244361 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..fe1dd23594 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMfaFactors( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-sessions.md b/docs/examples/1.8.x/console-web/examples/users/list-sessions.md new file mode 100644 index 0000000000..e3d5d6e51d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-targets.md b/docs/examples/1.8.x/console-web/examples/users/list-targets.md new file mode 100644 index 0000000000..58f4079aee --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list.md b/docs/examples/1.8.x/console-web/examples/users/list.md new file mode 100644 index 0000000000..d2189b9c93 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md b/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md new file mode 100644 index 0000000000..3fedd4b86f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-email.md b/docs/examples/1.8.x/console-web/examples/users/update-email.md new file mode 100644 index 0000000000..9922376778 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-email.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-labels.md b/docs/examples/1.8.x/console-web/examples/users/update-labels.md new file mode 100644 index 0000000000..4fc268fc3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..041cd9098b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-mfa.md b/docs/examples/1.8.x/console-web/examples/users/update-mfa.md new file mode 100644 index 0000000000..af710ecd48 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-name.md b/docs/examples/1.8.x/console-web/examples/users/update-name.md new file mode 100644 index 0000000000..b57cb33730 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-name.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-password.md b/docs/examples/1.8.x/console-web/examples/users/update-password.md new file mode 100644 index 0000000000..e9c7f9b51d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-password.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md b/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..a29e38591c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-phone.md b/docs/examples/1.8.x/console-web/examples/users/update-phone.md new file mode 100644 index 0000000000..a87780161b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-prefs.md b/docs/examples/1.8.x/console-web/examples/users/update-prefs.md new file mode 100644 index 0000000000..7d9993bbb1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-status.md b/docs/examples/1.8.x/console-web/examples/users/update-status.md new file mode 100644 index 0000000000..5e823e7a48 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-status.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateStatus( + '<USER_ID>', // userId + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-target.md b/docs/examples/1.8.x/console-web/examples/users/update-target.md new file mode 100644 index 0000000000..ed33fe9bb0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-target.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md b/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..84de3ffb26 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md @@ -0,0 +1,16 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepositoryDetection( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + VCSDetectionType.Runtime, // type + '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md b/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md new file mode 100644 index 0000000000..1d08ac5b09 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepository( + '<INSTALLATION_ID>', // installationId + '<NAME>', // name + false // private +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md b/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..3f760c09b6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.deleteInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md b/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md new file mode 100644 index 0000000000..4230f2bd9a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md b/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md new file mode 100644 index 0000000000..6d0cbd19ee --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md @@ -0,0 +1,16 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepositoryContents( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '<PROVIDER_REFERENCE>' // providerReference (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md b/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md new file mode 100644 index 0000000000..516265a0c8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepository( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md b/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md new file mode 100644 index 0000000000..1ba1e64615 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listInstallations( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..f414ec316b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md @@ -0,0 +1,15 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositories( + '<INSTALLATION_ID>', // installationId + VCSDetectionType.Runtime, // type + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md b/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..ba6b86a053 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositoryBranches( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md b/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..31425cb883 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.updateExternalDeployments( + '<INSTALLATION_ID>', // installationId + '<REPOSITORY_ID>', // repositoryId + '<PROVIDER_PULL_REQUEST_ID>' // providerPullRequestId +); + +console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-dart/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..7b1cc08304 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-dart/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..2305367d94 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-email-token.md b/docs/examples/1.8.x/server-dart/examples/account/create-email-token.md new file mode 100644 index 0000000000..e9696f92bf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..4288c71ce1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Jwt result = await account.createJWT(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..791b9cbd4f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // (optional) + phrase: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..87797fa645 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaType result = await account.createMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..62f3eaf2c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +MfaChallenge result = await account.createMfaChallenge( + factor: AuthenticationFactor.email, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..5ebe0e9e92 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..4a26a9fd7f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Token( + provider: OAuthProvider.amazon, + success: 'https://example.com', // (optional) + failure: 'https://example.com', // (optional) + scopes: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-dart/examples/account/create-phone-token.md new file mode 100644 index 0000000000..7011b3cf48 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-dart/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..8616834b27 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-recovery.md b/docs/examples/1.8.x/server-dart/examples/account/create-recovery.md new file mode 100644 index 0000000000..f56d4227a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-session.md b/docs/examples/1.8.x/server-dart/examples/account/create-session.md new file mode 100644 index 0000000000..1e56fc71bb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-verification.md b/docs/examples/1.8.x/server-dart/examples/account/create-verification.md new file mode 100644 index 0000000000..150833cd6b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create.md b/docs/examples/1.8.x/server-dart/examples/account/create.md new file mode 100644 index 0000000000..f0384f46f4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +User result = await account.create( + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-identity.md b/docs/examples/1.8.x/server-dart/examples/account/delete-identity.md new file mode 100644 index 0000000000..124e6adad4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '<IDENTITY_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..efd5263e22 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-session.md b/docs/examples/1.8.x/server-dart/examples/account/delete-session.md new file mode 100644 index 0000000000..d02808bbe9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-dart/examples/account/delete-sessions.md new file mode 100644 index 0000000000..9406ca39d0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteSessions(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..b073d40238 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get-prefs.md b/docs/examples/1.8.x/server-dart/examples/account/get-prefs.md new file mode 100644 index 0000000000..94e10db1b6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Preferences result = await account.getPrefs(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get-session.md b/docs/examples/1.8.x/server-dart/examples/account/get-session.md new file mode 100644 index 0000000000..3a81954bd9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get.md b/docs/examples/1.8.x/server-dart/examples/account/get.md new file mode 100644 index 0000000000..76a139a46a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.get(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-identities.md b/docs/examples/1.8.x/server-dart/examples/account/list-identities.md new file mode 100644 index 0000000000..a0b67851c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-logs.md b/docs/examples/1.8.x/server-dart/examples/account/list-logs.md new file mode 100644 index 0000000000..d3c50af1d5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +LogList result = await account.listLogs( + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-dart/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..32b269fbd7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaFactors result = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-sessions.md b/docs/examples/1.8.x/server-dart/examples/account/list-sessions.md new file mode 100644 index 0000000000..73cf462af6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +SessionList result = await account.listSessions(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-email.md b/docs/examples/1.8.x/server-dart/examples/account/update-email.md new file mode 100644 index 0000000000..cf6a56edcc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-email.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..947d862e46 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..475e464ff0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..5a0f98f578 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMfaAuthenticator( + type: AuthenticatorType.totp, + otp: '<OTP>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..749c4cd6a0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.updateMfaChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..7e274f0ead --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-name.md b/docs/examples/1.8.x/server-dart/examples/account/update-name.md new file mode 100644 index 0000000000..82cc3358a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-name.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateName( + name: '<NAME>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-password.md b/docs/examples/1.8.x/server-dart/examples/account/update-password.md new file mode 100644 index 0000000000..27d360ba51 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-password.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePassword( + password: '', + oldPassword: 'password', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-dart/examples/account/update-phone-session.md new file mode 100644 index 0000000000..046dd0a701 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-dart/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..f4b0c6fe6a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-phone.md b/docs/examples/1.8.x/server-dart/examples/account/update-phone.md new file mode 100644 index 0000000000..d861561b60 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-prefs.md b/docs/examples/1.8.x/server-dart/examples/account/update-prefs.md new file mode 100644 index 0000000000..f4533cbea6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-recovery.md b/docs/examples/1.8.x/server-dart/examples/account/update-recovery.md new file mode 100644 index 0000000000..162ad58ac9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-session.md b/docs/examples/1.8.x/server-dart/examples/account/update-session.md new file mode 100644 index 0000000000..a317a0840a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-status.md b/docs/examples/1.8.x/server-dart/examples/account/update-status.md new file mode 100644 index 0000000000..2ee15d603c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-status.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateStatus(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-verification.md b/docs/examples/1.8.x/server-dart/examples/account/update-verification.md new file mode 100644 index 0000000000..61904fd3f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-browser.md new file mode 100644 index 0000000000..8d5287511d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getBrowser( + code: Browser.avantBrowser, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..88fe35ebd9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getCreditCard( + code: CreditCard.americanExpress, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..d4cd8eae83 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getFavicon( + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-flag.md new file mode 100644 index 0000000000..56046681bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getFlag( + code: Flag.afghanistan, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-image.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-image.md new file mode 100644 index 0000000000..b6db1858c5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getImage( + url: 'https://example.com', + width: 0, // (optional) + height: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-initials.md new file mode 100644 index 0000000000..7dc0989b4d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getInitials( + name: '<NAME>', // (optional) + width: 0, // (optional) + height: 0, // (optional) + background: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..f64fe8a4ff --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getQR( + text: '<TEXT>', + size: 1, // (optional) + margin: 0, // (optional) + download: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..13ca992889 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md new file mode 100644 index 0000000000..61401761ec --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..2591011423 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md new file mode 100644 index 0000000000..1c9af5112c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md new file mode 100644 index 0000000000..f66ef9f1a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DocumentList result = await databases.createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..216d020260 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEmail result = await databases.createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d45ca4476c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEnum result = await databases.createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..75d47f44ad --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeFloat result = await databases.createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-index.md b/docs/examples/1.8.x/server-dart/examples/databases/create-index.md new file mode 100644 index 0000000000..c3fa1abd60 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Index result = await databases.createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: IndexType.key, + attributes: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..6511696f92 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeInteger result = await databases.createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..10ddb47bdf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeIp result = await databases.createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..dcdf34fcb8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..8785ea7647 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeString result = await databases.createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..9088f8dfeb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeUrl result = await databases.createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create.md b/docs/examples/1.8.x/server-dart/examples/databases/create.md new file mode 100644 index 0000000000..a2e978bd30 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..c8ec38dab8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Document result = await databases.decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..f9cbbd42ef --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-collection.md new file mode 100644 index 0000000000..919e17891b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-document.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-document.md new file mode 100644 index 0000000000..dd04d89959 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-documents.md new file mode 100644 index 0000000000..66bd5584c7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-documents.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-index.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-index.md new file mode 100644 index 0000000000..f16c84b9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete.md b/docs/examples/1.8.x/server-dart/examples/databases/delete.md new file mode 100644 index 0000000000..5e9042e542 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.delete( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/get-attribute.md new file mode 100644 index 0000000000..8329f8db05 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + + result = await databases.getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/get-collection.md new file mode 100644 index 0000000000..b678420128 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-document.md b/docs/examples/1.8.x/server-dart/examples/databases/get-document.md new file mode 100644 index 0000000000..45745186e6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-index.md b/docs/examples/1.8.x/server-dart/examples/databases/get-index.md new file mode 100644 index 0000000000..848257960a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Index result = await databases.getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get.md b/docs/examples/1.8.x/server-dart/examples/databases/get.md new file mode 100644 index 0000000000..28d3d2bd14 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.get( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..6e5134b03a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Document result = await databases.incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-dart/examples/databases/list-attributes.md new file mode 100644 index 0000000000..64aaf331b8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeList result = await databases.listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-collections.md b/docs/examples/1.8.x/server-dart/examples/databases/list-collections.md new file mode 100644 index 0000000000..69c2a0fe61 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +CollectionList result = await databases.listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/list-documents.md new file mode 100644 index 0000000000..cdecc59e33 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/databases/list-indexes.md new file mode 100644 index 0000000000..38b95d5d5b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +IndexList result = await databases.listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list.md b/docs/examples/1.8.x/server-dart/examples/databases/list.md new file mode 100644 index 0000000000..2de4e97cf2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DatabaseList result = await databases.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..46e3ef4ce3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md new file mode 100644 index 0000000000..c3c565b231 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..ddc8f26a70 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-document.md b/docs/examples/1.8.x/server-dart/examples/databases/update-document.md new file mode 100644 index 0000000000..47a1867c10 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/update-documents.md new file mode 100644 index 0000000000..70b7cbf86d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-documents.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DocumentList result = await databases.updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..ee0e09719e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEmail result = await databases.updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..61ef4d0835 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEnum result = await databases.updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..36f360eebc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeFloat result = await databases.updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..9089cc8bf6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeInteger result = await databases.updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..e698a59e3a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeIp result = await databases.updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..28aac9643f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..7674f51c5b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeString result = await databases.updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..3aaa01b441 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeUrl result = await databases.updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update.md b/docs/examples/1.8.x/server-dart/examples/databases/update.md new file mode 100644 index 0000000000..a46f116389 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md new file mode 100644 index 0000000000..f17f6cbbbd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..f60a37935a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DocumentList result = await databases.upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-deployment.md new file mode 100644 index 0000000000..f459b3dd89 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..34ff5b2067 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md new file mode 100644 index 0000000000..2ae64bce55 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // (optional) + xasync: false, // (optional) + path: '<PATH>', // (optional) + method: ExecutionMethod.gET, // (optional) + headers: {}, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..cc293b0c3b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/create-variable.md new file mode 100644 index 0000000000..03e36d8275 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.createVariable( + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..ed315a54e3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create.md b/docs/examples/1.8.x/server-dart/examples/functions/create.md new file mode 100644 index 0000000000..f3f2683000 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .node145, + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..8e4167f756 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/delete-execution.md new file mode 100644 index 0000000000..d077bc9328 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/delete-variable.md new file mode 100644 index 0000000000..d4b2832830 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete.md b/docs/examples/1.8.x/server-dart/examples/functions/delete.md new file mode 100644 index 0000000000..38d360b764 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.delete( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..e7bbacf344 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +UInt8List result = await functions.getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.source, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment.md new file mode 100644 index 0000000000..805ca0b634 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/get-execution.md new file mode 100644 index 0000000000..e0026e0c4b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/get-variable.md new file mode 100644 index 0000000000..fe61cee587 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get.md b/docs/examples/1.8.x/server-dart/examples/functions/get.md new file mode 100644 index 0000000000..c92a4f746c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.get( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-dart/examples/functions/list-deployments.md new file mode 100644 index 0000000000..d07d2b32f3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +DeploymentList result = await functions.listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-executions.md b/docs/examples/1.8.x/server-dart/examples/functions/list-executions.md new file mode 100644 index 0000000000..1dfd39093d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-dart/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a99f872b7e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +RuntimeList result = await functions.listRuntimes(); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-dart/examples/functions/list-specifications.md new file mode 100644 index 0000000000..bec5d5e635 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +SpecificationList result = await functions.listSpecifications(); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-variables.md b/docs/examples/1.8.x/server-dart/examples/functions/list-variables.md new file mode 100644 index 0000000000..0fa3b002bf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +VariableList result = await functions.listVariables( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list.md b/docs/examples/1.8.x/server-dart/examples/functions/list.md new file mode 100644 index 0000000000..8eaeec0625 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +FunctionList result = await functions.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-dart/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..2b068098af --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..0a5c09dd96 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/update-variable.md new file mode 100644 index 0000000000..7330d9f850 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // (optional) + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update.md b/docs/examples/1.8.x/server-dart/examples/functions/update.md new file mode 100644 index 0000000000..ebe3be8cc6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .node145, // (optional) + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/graphql/mutation.md b/docs/examples/1.8.x/server-dart/examples/graphql/mutation.md new file mode 100644 index 0000000000..a88749851c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/graphql/query.md b/docs/examples/1.8.x/server-dart/examples/graphql/query.md new file mode 100644 index 0000000000..2dca8f2929 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/graphql/query.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-dart/examples/health/get-antivirus.md new file mode 100644 index 0000000000..395d1f84d1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthAntivirus result = await health.getAntivirus(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-cache.md b/docs/examples/1.8.x/server-dart/examples/health/get-cache.md new file mode 100644 index 0000000000..6312e3cbe6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-cache.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getCache(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-certificate.md b/docs/examples/1.8.x/server-dart/examples/health/get-certificate.md new file mode 100644 index 0000000000..eac30a6aef --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthCertificate result = await health.getCertificate( + domain: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-d-b.md b/docs/examples/1.8.x/server-dart/examples/health/get-d-b.md new file mode 100644 index 0000000000..25ad9607f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getDB(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-dart/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..6f80718f6b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getFailedJobs( + name: .v1Database, + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-dart/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..d544fbfc40 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getPubSub(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..b48623ec18 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueBuilds( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..d72ac97b14 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueCertificates( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..b9d8e8bc66 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueDatabases( + name: '<NAME>', // (optional) + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..3074cbb8ab --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueDeletes( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..727fd239cc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueFunctions( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..32d3e3bb7b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueLogs( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..93ec993845 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMails( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..4ffd769d3c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMessaging( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..fab19875e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMigrations( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..89a3d03179 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueStatsResources( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..473dcd15ee --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueUsage( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..523c1007f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueWebhooks( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-dart/examples/health/get-storage-local.md new file mode 100644 index 0000000000..c33cf555f3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getStorageLocal(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-storage.md b/docs/examples/1.8.x/server-dart/examples/health/get-storage.md new file mode 100644 index 0000000000..cb6c572154 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-storage.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getStorage(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-time.md b/docs/examples/1.8.x/server-dart/examples/health/get-time.md new file mode 100644 index 0000000000..f4439957d9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-time.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthTime result = await health.getTime(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get.md b/docs/examples/1.8.x/server-dart/examples/health/get.md new file mode 100644 index 0000000000..3134490848 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.get(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/get.md b/docs/examples/1.8.x/server-dart/examples/locale/get.md new file mode 100644 index 0000000000..dec6f068c6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +Locale result = await locale.get(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-codes.md b/docs/examples/1.8.x/server-dart/examples/locale/list-codes.md new file mode 100644 index 0000000000..9f9eac9f29 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-continents.md b/docs/examples/1.8.x/server-dart/examples/locale/list-continents.md new file mode 100644 index 0000000000..276738eac7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..59596c624c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..2a2d32eaca --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-countries.md b/docs/examples/1.8.x/server-dart/examples/locale/list-countries.md new file mode 100644 index 0000000000..6b8343c6b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-dart/examples/locale/list-currencies.md new file mode 100644 index 0000000000..48247d98fe --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-languages.md b/docs/examples/1.8.x/server-dart/examples/locale/list-languages.md new file mode 100644 index 0000000000..2376f18917 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..82c1eb5da6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-email.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-email.md new file mode 100644 index 0000000000..78c695c7ed --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + cc: [], // (optional) + bcc: [], // (optional) + attachments: [], // (optional) + draft: false, // (optional) + html: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..25c2cb8cfa --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..10d803d624 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + domain: '<DOMAIN>', // (optional) + isEuRegion: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..b283b75325 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-push.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-push.md new file mode 100644 index 0000000000..58d82c7a0a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '[ID1:ID2]', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 0, // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..e759a26094 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-sms.md new file mode 100644 index 0000000000..04a715870f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createSms( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..6201987fbb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, // (optional) + username: '<USERNAME>', // (optional) + password: '<PASSWORD>', // (optional) + encryption: SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..5fd4859fb9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..5417b951dd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..4cf6463b6e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-topic.md new file mode 100644 index 0000000000..67e47412a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..8c3370baa7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..d625f38230 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..361bacc2c3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.deleteProvider( + providerId: '<PROVIDER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..e4a044c280 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..59c5592c93 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.deleteTopic( + topicId: '<TOPIC_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete.md new file mode 100644 index 0000000000..14b680ae99 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.delete( + messageId: '<MESSAGE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-message.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-message.md new file mode 100644 index 0000000000..ccc98961e7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.getMessage( + messageId: '<MESSAGE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-provider.md new file mode 100644 index 0000000000..a82ef15775 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.getProvider( + providerId: '<PROVIDER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..03f78b7fa4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-topic.md new file mode 100644 index 0000000000..204f875793 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.getTopic( + topicId: '<TOPIC_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..1d2b1805b4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listMessageLogs( + messageId: '<MESSAGE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-messages.md new file mode 100644 index 0000000000..2c0a142ee8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +MessageList result = await messaging.listMessages( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..9f40a5fa49 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listProviderLogs( + providerId: '<PROVIDER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-providers.md new file mode 100644 index 0000000000..df7a8a022c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +ProviderList result = await messaging.listProviders( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..3a9593ca89 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listSubscriberLogs( + subscriberId: '<SUBSCRIBER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..19d907cd9a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +SubscriberList result = await messaging.listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-targets.md new file mode 100644 index 0000000000..5a327773c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +TargetList result = await messaging.listTargets( + messageId: '<MESSAGE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..0ab02eaa74 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listTopicLogs( + topicId: '<TOPIC_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-topics.md new file mode 100644 index 0000000000..c5fdb4901f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +TopicList result = await messaging.listTopics( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..edc0a1f769 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-email.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-email.md new file mode 100644 index 0000000000..b725cee5f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + subject: '<SUBJECT>', // (optional) + content: '<CONTENT>', // (optional) + draft: false, // (optional) + html: false, // (optional) + cc: [], // (optional) + bcc: [], // (optional) + scheduledAt: '', // (optional) + attachments: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..1e2d8a8ca2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + serviceAccountJSON: {}, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..c042a6faaa --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + domain: '<DOMAIN>', // (optional) + isEuRegion: false, // (optional) + enabled: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..24290e958f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-push.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-push.md new file mode 100644 index 0000000000..f7cc117b64 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '[ID1:ID2]', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 0, // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..53b8c33df4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-sms.md new file mode 100644 index 0000000000..f4356deed3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateSms( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + content: '<CONTENT>', // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..16530c01c8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + host: '<HOST>', // (optional) + port: 1, // (optional) + username: '<USERNAME>', // (optional) + password: '<PASSWORD>', // (optional) + encryption: SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..4bf76fbcfe --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..86bb985778 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-topic.md new file mode 100644 index 0000000000..5311fd5e9b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // (optional) + subscribe: ["any"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..8ace97521b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..e0d95d1cb4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-deployment.md new file mode 100644 index 0000000000..93f9615b8b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createDeployment( + siteId: '<SITE_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..1a3e84a33c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..348b4652b6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/create-variable.md new file mode 100644 index 0000000000..aa3c876174 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.createVariable( + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..50f65b9603 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createVcsDeployment( + siteId: '<SITE_ID>', + type: VCSDeploymentType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create.md b/docs/examples/1.8.x/server-dart/examples/sites/create.md new file mode 100644 index 0000000000..448abab1df --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .analog, + buildRuntime: .node145, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + adapter: .static, // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..ca93ac668d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete-log.md b/docs/examples/1.8.x/server-dart/examples/sites/delete-log.md new file mode 100644 index 0000000000..c11ecab71e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/delete-variable.md new file mode 100644 index 0000000000..f04b9451ae --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete.md b/docs/examples/1.8.x/server-dart/examples/sites/delete.md new file mode 100644 index 0000000000..e81df372bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.delete( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..ad21070b8a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +UInt8List result = await sites.getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.source, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment.md new file mode 100644 index 0000000000..9acc89b56f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-log.md b/docs/examples/1.8.x/server-dart/examples/sites/get-log.md new file mode 100644 index 0000000000..195f8aad2d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-log.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Execution result = await sites.getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/get-variable.md new file mode 100644 index 0000000000..637e08a58c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get.md b/docs/examples/1.8.x/server-dart/examples/sites/get.md new file mode 100644 index 0000000000..32abcfcffc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.get( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-dart/examples/sites/list-deployments.md new file mode 100644 index 0000000000..6f6c9ce3f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +DeploymentList result = await sites.listDeployments( + siteId: '<SITE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-dart/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..72a600fad3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +FrameworkList result = await sites.listFrameworks(); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-logs.md b/docs/examples/1.8.x/server-dart/examples/sites/list-logs.md new file mode 100644 index 0000000000..4ccf170f8b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +ExecutionList result = await sites.listLogs( + siteId: '<SITE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-dart/examples/sites/list-specifications.md new file mode 100644 index 0000000000..b81faf0e43 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +SpecificationList result = await sites.listSpecifications(); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-variables.md b/docs/examples/1.8.x/server-dart/examples/sites/list-variables.md new file mode 100644 index 0000000000..14be96629c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +VariableList result = await sites.listVariables( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list.md b/docs/examples/1.8.x/server-dart/examples/sites/list.md new file mode 100644 index 0000000000..0dd52262f1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +SiteList result = await sites.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-dart/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..bd031cf27a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..dbb4e27aa6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/update-variable.md new file mode 100644 index 0000000000..af2123c989 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // (optional) + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update.md b/docs/examples/1.8.x/server-dart/examples/sites/update.md new file mode 100644 index 0000000000..c13acfb25b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .analog, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + buildRuntime: .node145, // (optional) + adapter: .static, // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md new file mode 100644 index 0000000000..c09a4f2c5d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: .none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/create-file.md b/docs/examples/1.8.x/server-dart/examples/storage/create-file.md new file mode 100644 index 0000000000..e631416ecb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..1eb1b51ca2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +await storage.deleteBucket( + bucketId: '<BUCKET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/delete-file.md b/docs/examples/1.8.x/server-dart/examples/storage/delete-file.md new file mode 100644 index 0000000000..26dd602c7e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/get-bucket.md new file mode 100644 index 0000000000..3464d2233b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.getBucket( + bucketId: '<BUCKET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file-download.md new file mode 100644 index 0000000000..8c119c386c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..a1f3c09b33 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // (optional) + height: 0, // (optional) + gravity: ImageGravity.center, // (optional) + quality: -1, // (optional) + borderWidth: 0, // (optional) + borderColor: '', // (optional) + borderRadius: 0, // (optional) + opacity: 0, // (optional) + rotation: -360, // (optional) + background: '', // (optional) + output: ImageFormat.jpg, // (optional) + token: '<TOKEN>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file-view.md new file mode 100644 index 0000000000..d48b51c19c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file.md new file mode 100644 index 0000000000..f765c62356 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-dart/examples/storage/list-buckets.md new file mode 100644 index 0000000000..c20dac1968 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +BucketList result = await storage.listBuckets( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/list-files.md b/docs/examples/1.8.x/server-dart/examples/storage/list-files.md new file mode 100644 index 0000000000..28f85b091a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md new file mode 100644 index 0000000000..b4e45e059c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: .none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/update-file.md b/docs/examples/1.8.x/server-dart/examples/storage/update-file.md new file mode 100644 index 0000000000..966883a1f9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..5b3e987b9b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnBoolean result = await tables.createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..1ad3fa250d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnDatetime result = await tables.createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md new file mode 100644 index 0000000000..fa7ec71410 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEmail result = await tables.createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..5ab6bcc774 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEnum result = await tables.createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md new file mode 100644 index 0000000000..43331187ea --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnFloat result = await tables.createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md new file mode 100644 index 0000000000..d76c46959f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndex result = await tables.createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.key, + columns: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..3304325af7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnInteger result = await tables.createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..68c7abf754 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIp result = await tables.createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..a059740bf8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnRelationship result = await tables.createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-row.md b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md new file mode 100644 index 0000000000..1ce1e1db7a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md new file mode 100644 index 0000000000..219f2d2d33 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md new file mode 100644 index 0000000000..17e192b27e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnString result = await tables.createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d3692fc7ac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnUrl result = await tables.createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create.md b/docs/examples/1.8.x/server-dart/examples/tables/create.md new file mode 100644 index 0000000000..c3a4b2a989 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.create( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..33d296110c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Row result = await tables.decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md new file mode 100644 index 0000000000..466564f618 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md new file mode 100644 index 0000000000..f2dfdbe74b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md new file mode 100644 index 0000000000..b84c1b7a9f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +await tables.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md new file mode 100644 index 0000000000..41dc3a9520 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete.md b/docs/examples/1.8.x/server-dart/examples/tables/delete.md new file mode 100644 index 0000000000..07c9815422 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.delete( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-column.md b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md new file mode 100644 index 0000000000..087139c87d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + + result = await tables.getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-index.md b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md new file mode 100644 index 0000000000..3f79deef2f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndex result = await tables.getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-row.md b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md new file mode 100644 index 0000000000..7efd04a69d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +Row result = await tables.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get.md b/docs/examples/1.8.x/server-dart/examples/tables/get.md new file mode 100644 index 0000000000..d02f9ff9d2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.get( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..188ab5d1ad --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Row result = await tables.incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md new file mode 100644 index 0000000000..7b2d479ea3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnList result = await tables.listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md new file mode 100644 index 0000000000..e7418de3bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndexList result = await tables.listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md new file mode 100644 index 0000000000..05f9567ac2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +RowList result = await tables.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list.md b/docs/examples/1.8.x/server-dart/examples/tables/list.md new file mode 100644 index 0000000000..51a19c099d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +TableList result = await tables.list( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..c452238d7c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnBoolean result = await tables.updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..5b41d7e532 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnDatetime result = await tables.updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md new file mode 100644 index 0000000000..444649a4fd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEmail result = await tables.updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..2e0566418a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEnum result = await tables.updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md new file mode 100644 index 0000000000..199d3840d6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnFloat result = await tables.updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..479e63d870 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnInteger result = await tables.updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..837ae4e606 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIp result = await tables.updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..45745627ef --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnRelationship result = await tables.updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-row.md b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md new file mode 100644 index 0000000000..436329235a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +Row result = await tables.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md new file mode 100644 index 0000000000..3d2aaf3e28 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md new file mode 100644 index 0000000000..dbd569feac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnString result = await tables.updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md new file mode 100644 index 0000000000..8630c718b5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnUrl result = await tables.updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update.md b/docs/examples/1.8.x/server-dart/examples/tables/update.md new file mode 100644 index 0000000000..28ce03cd6c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.update( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md new file mode 100644 index 0000000000..47f93f2434 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..73ceffa917 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/create-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/create-membership.md new file mode 100644 index 0000000000..f13a6e69bb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // (optional) + userId: '<USER_ID>', // (optional) + phone: '+12065550100', // (optional) + url: 'https://example.com', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/create.md b/docs/examples/1.8.x/server-dart/examples/teams/create.md new file mode 100644 index 0000000000..772f3cfa86 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/delete-membership.md new file mode 100644 index 0000000000..9d99cbbd3d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/delete.md b/docs/examples/1.8.x/server-dart/examples/teams/delete.md new file mode 100644 index 0000000000..1c08ab8ed9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.delete( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/get-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/get-membership.md new file mode 100644 index 0000000000..0bdc63f8d4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-dart/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e206393320 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/get.md b/docs/examples/1.8.x/server-dart/examples/teams/get.md new file mode 100644 index 0000000000..bb3bcaf7e2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-dart/examples/teams/list-memberships.md new file mode 100644 index 0000000000..3c01dec4c5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '<TEAM_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/list.md b/docs/examples/1.8.x/server-dart/examples/teams/list.md new file mode 100644 index 0000000000..093a139f71 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-dart/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c947162fa4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/update-membership.md new file mode 100644 index 0000000000..87a4325857 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-name.md b/docs/examples/1.8.x/server-dart/examples/teams/update-name.md new file mode 100644 index 0000000000..fe3a9faabf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '<TEAM_ID>', + name: '<NAME>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-dart/examples/teams/update-prefs.md new file mode 100644 index 0000000000..57518ada43 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '<TEAM_ID>', + prefs: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-dart/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..cc75a91726 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/create-file-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.createFileToken( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/delete.md b/docs/examples/1.8.x/server-dart/examples/tokens/delete.md new file mode 100644 index 0000000000..ce95e7b752 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +await tokens.delete( + tokenId: '<TOKEN_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/get.md b/docs/examples/1.8.x/server-dart/examples/tokens/get.md new file mode 100644 index 0000000000..3112b5e1e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.get( + tokenId: '<TOKEN_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/list.md b/docs/examples/1.8.x/server-dart/examples/tokens/list.md new file mode 100644 index 0000000000..5331e44de3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/list.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceTokenList result = await tokens.list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/update.md b/docs/examples/1.8.x/server-dart/examples/tokens/update.md new file mode 100644 index 0000000000..47e910d574 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/update.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.update( + tokenId: '<TOKEN_ID>', + expire: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md new file mode 100644 index 0000000000..38b0255ea4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..aa898ba22f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..6e8b7a2bac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Jwt result = await users.createJWT( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // (optional) + duration: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..e08edd617f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..c2b9562e4e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.createMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..9f23baaef2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..628cf3297e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash.sha1, // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..34bfbf66c4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..20cf911a09 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-session.md b/docs/examples/1.8.x/server-dart/examples/users/create-session.md new file mode 100644 index 0000000000..4293e7edf6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Session result = await users.createSession( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-target.md b/docs/examples/1.8.x/server-dart/examples/users/create-target.md new file mode 100644 index 0000000000..354a8dbb48 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-target.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType.email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-token.md b/docs/examples/1.8.x/server-dart/examples/users/create-token.md new file mode 100644 index 0000000000..ab7acba3dd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Token result = await users.createToken( + userId: '<USER_ID>', + length: 4, // (optional) + expire: 60, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create.md b/docs/examples/1.8.x/server-dart/examples/users/create.md new file mode 100644 index 0000000000..b4953748e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.create( + userId: '<USER_ID>', + email: 'email@example.com', // (optional) + phone: '+12065550100', // (optional) + password: '', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-identity.md b/docs/examples/1.8.x/server-dart/examples/users/delete-identity.md new file mode 100644 index 0000000000..7ac2da9000 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteIdentity( + identityId: '<IDENTITY_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..eed7dbd41b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteMfaAuthenticator( + userId: '<USER_ID>', + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-session.md b/docs/examples/1.8.x/server-dart/examples/users/delete-session.md new file mode 100644 index 0000000000..68d243e52f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-session.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-dart/examples/users/delete-sessions.md new file mode 100644 index 0000000000..07c3566a7c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteSessions( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-target.md b/docs/examples/1.8.x/server-dart/examples/users/delete-target.md new file mode 100644 index 0000000000..aa27b32d38 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-target.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete.md b/docs/examples/1.8.x/server-dart/examples/users/delete.md new file mode 100644 index 0000000000..93819b72d7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.delete( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..cf66c67610 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.getMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get-prefs.md b/docs/examples/1.8.x/server-dart/examples/users/get-prefs.md new file mode 100644 index 0000000000..146cff6820 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Preferences result = await users.getPrefs( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get-target.md b/docs/examples/1.8.x/server-dart/examples/users/get-target.md new file mode 100644 index 0000000000..9ddaafb55f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get-target.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get.md b/docs/examples/1.8.x/server-dart/examples/users/get.md new file mode 100644 index 0000000000..a171b79582 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.get( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-identities.md b/docs/examples/1.8.x/server-dart/examples/users/list-identities.md new file mode 100644 index 0000000000..2c14775e9a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-identities.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +IdentityList result = await users.listIdentities( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-logs.md b/docs/examples/1.8.x/server-dart/examples/users/list-logs.md new file mode 100644 index 0000000000..5885dcb874 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +LogList result = await users.listLogs( + userId: '<USER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-memberships.md b/docs/examples/1.8.x/server-dart/examples/users/list-memberships.md new file mode 100644 index 0000000000..dabe5a123c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MembershipList result = await users.listMemberships( + userId: '<USER_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-dart/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..7134ee5dab --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaFactors result = await users.listMfaFactors( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-sessions.md b/docs/examples/1.8.x/server-dart/examples/users/list-sessions.md new file mode 100644 index 0000000000..22a37c05a0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +SessionList result = await users.listSessions( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-targets.md b/docs/examples/1.8.x/server-dart/examples/users/list-targets.md new file mode 100644 index 0000000000..971fbea0e1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-targets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +TargetList result = await users.listTargets( + userId: '<USER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list.md b/docs/examples/1.8.x/server-dart/examples/users/list.md new file mode 100644 index 0000000000..6d34bb470b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +UserList result = await users.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-dart/examples/users/update-email-verification.md new file mode 100644 index 0000000000..9930e30be5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-email.md b/docs/examples/1.8.x/server-dart/examples/users/update-email.md new file mode 100644 index 0000000000..129a8e2437 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-email.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateEmail( + userId: '<USER_ID>', + email: 'email@example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-labels.md b/docs/examples/1.8.x/server-dart/examples/users/update-labels.md new file mode 100644 index 0000000000..d247bf5e74 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-labels.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateLabels( + userId: '<USER_ID>', + labels: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..3b7d81f57c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.updateMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-mfa.md b/docs/examples/1.8.x/server-dart/examples/users/update-mfa.md new file mode 100644 index 0000000000..f26b105534 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateMfa( + userId: '<USER_ID>', + mfa: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-name.md b/docs/examples/1.8.x/server-dart/examples/users/update-name.md new file mode 100644 index 0000000000..905cee0e49 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-name.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateName( + userId: '<USER_ID>', + name: '<NAME>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-password.md b/docs/examples/1.8.x/server-dart/examples/users/update-password.md new file mode 100644 index 0000000000..14e27482ec --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-password.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePassword( + userId: '<USER_ID>', + password: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-dart/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..b57aafab1f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-phone.md b/docs/examples/1.8.x/server-dart/examples/users/update-phone.md new file mode 100644 index 0000000000..aa891d2351 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-phone.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePhone( + userId: '<USER_ID>', + number: '+12065550100', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-prefs.md b/docs/examples/1.8.x/server-dart/examples/users/update-prefs.md new file mode 100644 index 0000000000..87fc2968f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Preferences result = await users.updatePrefs( + userId: '<USER_ID>', + prefs: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-status.md b/docs/examples/1.8.x/server-dart/examples/users/update-status.md new file mode 100644 index 0000000000..4d8dca03ad --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateStatus( + userId: '<USER_ID>', + status: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-target.md b/docs/examples/1.8.x/server-dart/examples/users/update-target.md new file mode 100644 index 0000000000..f66f0b7475 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-target.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // (optional) + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..62ad345304 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..d08a92d2c3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md new file mode 100644 index 0000000000..384a3fbbea --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createEmailToken( + '<USER_ID>', // userId + 'email@example.com', // email + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a0a7f722cc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createJWT(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..29e552a819 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createMagicURLToken( + '<USER_ID>', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..52c193a848 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..296e36dec4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import { Client, Account, AuthenticationFactor } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..cfd9aa2ba8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..24e43a9d9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import { Client, Account, OAuthProvider } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md new file mode 100644 index 0000000000..77e4adcb9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createPhoneToken( + '<USER_ID>', // userId + '+12065550100' // phone +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..8f01304f5b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md b/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md new file mode 100644 index 0000000000..a3d92d866e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-session.md new file mode 100644 index 0000000000..888493a21a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-verification.md b/docs/examples/1.8.x/server-deno/examples/account/create-verification.md new file mode 100644 index 0000000000..438feee807 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createVerification( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create.md b/docs/examples/1.8.x/server-deno/examples/account/create.md new file mode 100644 index 0000000000..c410a0f7c7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.create( + '<USER_ID>', // userId + 'email@example.com', // email + '', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md b/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md new file mode 100644 index 0000000000..359c7a3cfa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..f4b164b43d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-session.md b/docs/examples/1.8.x/server-deno/examples/account/delete-session.md new file mode 100644 index 0000000000..a0b7d19687 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-deno/examples/account/delete-sessions.md new file mode 100644 index 0000000000..864c50535b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteSessions(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..73fc143978 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/account/get-prefs.md new file mode 100644 index 0000000000..4479df71f7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getPrefs(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get-session.md b/docs/examples/1.8.x/server-deno/examples/account/get-session.md new file mode 100644 index 0000000000..c380b72ed5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get.md b/docs/examples/1.8.x/server-deno/examples/account/get.md new file mode 100644 index 0000000000..5abdc95ec7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.get(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-identities.md b/docs/examples/1.8.x/server-deno/examples/account/list-identities.md new file mode 100644 index 0000000000..1c612f9737 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listIdentities( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-logs.md b/docs/examples/1.8.x/server-deno/examples/account/list-logs.md new file mode 100644 index 0000000000..28ab351f5a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listLogs( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-deno/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..35fb7497de --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-sessions.md b/docs/examples/1.8.x/server-deno/examples/account/list-sessions.md new file mode 100644 index 0000000000..e34da16995 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listSessions(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-email.md b/docs/examples/1.8.x/server-deno/examples/account/update-email.md new file mode 100644 index 0000000000..0753cff9fd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-email.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..24611aa43a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMFA( + false // mfa +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..a83c1d91a4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.updateMagicURLSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..6b95818e06 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..61a7b44fd0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaChallenge( + '<CHALLENGE_ID>', // challengeId + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..2030e1c551 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-name.md b/docs/examples/1.8.x/server-deno/examples/account/update-name.md new file mode 100644 index 0000000000..a02591b3b5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-name.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateName( + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-password.md b/docs/examples/1.8.x/server-deno/examples/account/update-password.md new file mode 100644 index 0000000000..088bea88ac --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-password.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md new file mode 100644 index 0000000000..4710a451a8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.updatePhoneSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..3b150c8c4a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePhoneVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone.md new file mode 100644 index 0000000000..9c1923c217 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md new file mode 100644 index 0000000000..4b37a64fe7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePrefs( + {} // prefs +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md b/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md new file mode 100644 index 0000000000..5d0d80f956 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateRecovery( + '<USER_ID>', // userId + '<SECRET>', // secret + '' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-session.md new file mode 100644 index 0000000000..cb36b9491e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-status.md b/docs/examples/1.8.x/server-deno/examples/account/update-status.md new file mode 100644 index 0000000000..0c70c88b51 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-status.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateStatus(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-verification.md b/docs/examples/1.8.x/server-deno/examples/account/update-verification.md new file mode 100644 index 0000000000..96370858cd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md new file mode 100644 index 0000000000..5443200b39 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +import { Client, Avatars, Browser } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..8bcc67e08c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +import { Client, Avatars, CreditCard } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..cca313a9a2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6837438c10 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +import { Client, Avatars, Flag } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md new file mode 100644 index 0000000000..2960daba8d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md new file mode 100644 index 0000000000..10eb2d80b8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '<NAME>', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..d9ccc0dbca --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '<TEXT>', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..b216c2ead3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md new file mode 100644 index 0000000000..c7e8026758 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..664da19de2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md new file mode 100644 index 0000000000..f18b4f30dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new Databases(client); + +const response = await databases.createDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md new file mode 100644 index 0000000000..fa3fe84731 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // documents +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..6c667ed38a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..6fdd2773c8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..c5991d49f6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-index.md b/docs/examples/1.8.x/server-deno/examples/databases/create-index.md new file mode 100644 index 0000000000..3ab3c7a3aa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-index.md @@ -0,0 +1,18 @@ +import { Client, Databases, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + IndexType.Key, // type + [], // attributes + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..4a306cd50d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..c043b25207 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..d96ee59a4d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<RELATED_COLLECTION_ID>', // relatedCollectionId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..5f8e955541 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..4639f75f5b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create.md b/docs/examples/1.8.x/server-deno/examples/databases/create.md new file mode 100644 index 0000000000..86795eb750 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.create( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..0142188185 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.decrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..f7ad6b105a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md new file mode 100644 index 0000000000..828d48a7bc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md new file mode 100644 index 0000000000..47d5df49f1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.deleteDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md new file mode 100644 index 0000000000..4768ed426b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md new file mode 100644 index 0000000000..eee1613a87 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete.md b/docs/examples/1.8.x/server-deno/examples/databases/delete.md new file mode 100644 index 0000000000..39b3f5395e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete.md @@ -0,0 +1,12 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.delete( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md new file mode 100644 index 0000000000..f2b801b5f1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md new file mode 100644 index 0000000000..b94f4fd5ff --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-document.md b/docs/examples/1.8.x/server-deno/examples/databases/get-document.md new file mode 100644 index 0000000000..5cb02c4de3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.getDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-index.md b/docs/examples/1.8.x/server-deno/examples/databases/get-index.md new file mode 100644 index 0000000000..6c3a3dec1a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-index.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get.md b/docs/examples/1.8.x/server-deno/examples/databases/get.md new file mode 100644 index 0000000000..403e467e04 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get.md @@ -0,0 +1,12 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.get( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..9202a94bb9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.incrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md new file mode 100644 index 0000000000..2171ffe4ad --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listAttributes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md b/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md new file mode 100644 index 0000000000..408ea2d601 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listCollections( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md new file mode 100644 index 0000000000..528e979517 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.listDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md new file mode 100644 index 0000000000..88af3b7f28 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listIndexes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list.md b/docs/examples/1.8.x/server-deno/examples/databases/list.md new file mode 100644 index 0000000000..dcae151617 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..fe1b80073a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md new file mode 100644 index 0000000000..47f1c02783 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..ad18d93865 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-document.md b/docs/examples/1.8.x/server-deno/examples/databases/update-document.md new file mode 100644 index 0000000000..31cce5ed1c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.updateDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md new file mode 100644 index 0000000000..1eef7794fb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..116fadc6c7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..663e44b530 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..d9eab5aac5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..369b49d574 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..049a527993 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..7fae26b535 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +import { Client, Databases, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..ec91d3367e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..32f44b7eaf --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update.md b/docs/examples/1.8.x/server-deno/examples/databases/update.md new file mode 100644 index 0000000000..b87ad82ec0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.update( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md new file mode 100644 index 0000000000..a8a61ca43c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new Databases(client); + +const response = await databases.upsertDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..bf9e7ded89 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.upsertDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md new file mode 100644 index 0000000000..a134a382fa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createDeployment( + '<FUNCTION_ID>', // functionId + InputFile.fromPath('/path/to/file.png', 'file.png'), // code + false, // activate + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>' // commands (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..e22d1da72a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createDuplicateDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + '<BUILD_ID>' // buildId (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md new file mode 100644 index 0000000000..bec6a17db2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import { Client, Functions, ExecutionMethod } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.createExecution( + '<FUNCTION_ID>', // functionId + '<BODY>', // body (optional) + false, // async (optional) + '<PATH>', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..69503da6a9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createTemplateDeployment( + '<FUNCTION_ID>', // functionId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md new file mode 100644 index 0000000000..28648901ee --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createVariable( + '<FUNCTION_ID>', // functionId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..d501b0ee26 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import { Client, Functions, VCSDeploymentType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createVcsDeployment( + '<FUNCTION_ID>', // functionId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create.md b/docs/examples/1.8.x/server-deno/examples/functions/create.md new file mode 100644 index 0000000000..32265deb0b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create.md @@ -0,0 +1,29 @@ +import { Client, Functions, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.create( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + .Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..179bbaf303 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md new file mode 100644 index 0000000000..4ab7c37785 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md new file mode 100644 index 0000000000..39a9428ed3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete.md b/docs/examples/1.8.x/server-deno/examples/functions/delete.md new file mode 100644 index 0000000000..94d58c33dd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.delete( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..d153036c9a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +import { Client, Functions, DeploymentDownloadType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const result = functions.getDeploymentDownload( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md new file mode 100644 index 0000000000..339b99d4f1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.getDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md new file mode 100644 index 0000000000..adeff0256a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.getExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md new file mode 100644 index 0000000000..cbbdd2f847 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.getVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get.md b/docs/examples/1.8.x/server-deno/examples/functions/get.md new file mode 100644 index 0000000000..8fec17ed15 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.get( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md new file mode 100644 index 0000000000..849fe232b8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listDeployments( + '<FUNCTION_ID>', // functionId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md b/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md new file mode 100644 index 0000000000..cd597fb7a5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.listExecutions( + '<FUNCTION_ID>', // functionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-deno/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a45afe4aa7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listRuntimes(); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-deno/examples/functions/list-specifications.md new file mode 100644 index 0000000000..3bf0d08e7c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listSpecifications(); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md b/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md new file mode 100644 index 0000000000..173d5aa9ef --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listVariables( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list.md b/docs/examples/1.8.x/server-deno/examples/functions/list.md new file mode 100644 index 0000000000..ecc43d1a7c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..4c7e8052c1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateDeploymentStatus( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..55196c148d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateFunctionDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md new file mode 100644 index 0000000000..3da706d5f4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update.md b/docs/examples/1.8.x/server-deno/examples/functions/update.md new file mode 100644 index 0000000000..399af05841 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update.md @@ -0,0 +1,29 @@ +import { Client, Functions, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.update( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + .Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md new file mode 100644 index 0000000000..200120f1e8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import { Client, Graphql } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new Graphql(client); + +const response = await graphql.mutation( + {} // query +); diff --git a/docs/examples/1.8.x/server-deno/examples/graphql/query.md b/docs/examples/1.8.x/server-deno/examples/graphql/query.md new file mode 100644 index 0000000000..bb0116278c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/graphql/query.md @@ -0,0 +1,12 @@ +import { Client, Graphql } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new Graphql(client); + +const response = await graphql.query( + {} // query +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-deno/examples/health/get-antivirus.md new file mode 100644 index 0000000000..d8dcc1fe3a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getAntivirus(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-cache.md b/docs/examples/1.8.x/server-deno/examples/health/get-cache.md new file mode 100644 index 0000000000..e138b50b26 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-cache.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getCache(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md b/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md new file mode 100644 index 0000000000..828e53dd7b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getCertificate( + '' // domain (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-d-b.md b/docs/examples/1.8.x/server-deno/examples/health/get-d-b.md new file mode 100644 index 0000000000..bded9eb81b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getDB(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..5e40f762e4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +import { Client, Health, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getFailedJobs( + .V1Database, // name + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-deno/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..ecc05a3e21 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getPubSub(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..f6b9388bb3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueBuilds( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..e783fa52b3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueCertificates( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..e33c7a2929 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueDatabases( + '<NAME>', // name (optional) + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..ea7da5b587 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueDeletes( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..e075a65602 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueFunctions( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..eb7ffb028a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueLogs( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..d9f61bc088 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMails( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..8bc76398d9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMessaging( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..e6f7bf543c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMigrations( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..ecc7ebd322 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueStatsResources( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..46aa4db5be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueUsage( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..75a1c1f833 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueWebhooks( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-deno/examples/health/get-storage-local.md new file mode 100644 index 0000000000..0e64e1a6dd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getStorageLocal(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-storage.md b/docs/examples/1.8.x/server-deno/examples/health/get-storage.md new file mode 100644 index 0000000000..698e33b999 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-storage.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getStorage(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-time.md b/docs/examples/1.8.x/server-deno/examples/health/get-time.md new file mode 100644 index 0000000000..1bb1ae0e56 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-time.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getTime(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get.md b/docs/examples/1.8.x/server-deno/examples/health/get.md new file mode 100644 index 0000000000..87d7ea5396 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.get(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/get.md b/docs/examples/1.8.x/server-deno/examples/locale/get.md new file mode 100644 index 0000000000..960ee6f4f3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/get.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.get(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-codes.md b/docs/examples/1.8.x/server-deno/examples/locale/list-codes.md new file mode 100644 index 0000000000..8f91c212df --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-continents.md b/docs/examples/1.8.x/server-deno/examples/locale/list-continents.md new file mode 100644 index 0000000000..55b208c741 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listContinents(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..b4fbfa0e37 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..19ac0a06cf --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-countries.md b/docs/examples/1.8.x/server-deno/examples/locale/list-countries.md new file mode 100644 index 0000000000..67ba0fedd7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountries(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-deno/examples/locale/list-currencies.md new file mode 100644 index 0000000000..986f09d237 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-languages.md b/docs/examples/1.8.x/server-deno/examples/locale/list-languages.md new file mode 100644 index 0000000000..91b4a857b9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..e2c33feff8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md new file mode 100644 index 0000000000..8db2879f9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createEmail( + '<MESSAGE_ID>', // messageId + '<SUBJECT>', // subject + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..3f443d6bf5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..32f7c94f21 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..57e94188b9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>', // authKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md new file mode 100644 index 0000000000..7523c2978f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createPush( + '<MESSAGE_ID>', // messageId + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..15fe7b8c7b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md new file mode 100644 index 0000000000..264203a8be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..2d6d33c62a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +import { Client, Messaging, SmtpEncryption } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..8be79f3f9e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new Messaging(client); + +const response = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..2bb95c4e2d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..4657493664 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md new file mode 100644 index 0000000000..c2ca3a4ed2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..aa7bbf6a18 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..5fe734fb0c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..7bc99ef3b5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..147456887d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new Messaging(client); + +const response = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..aa1359cf28 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete.md new file mode 100644 index 0000000000..0442da1e8b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.delete( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md new file mode 100644 index 0000000000..9565a611ae --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md new file mode 100644 index 0000000000..8e5d426418 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..e9377a532f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md new file mode 100644 index 0000000000..35f1853ada --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..f39a90037a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md new file mode 100644 index 0000000000..50b1a10f4b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..c4b20a8306 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md new file mode 100644 index 0000000000..7c877c25de --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..0d14f85777 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..384bb8fe4f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md new file mode 100644 index 0000000000..5ce2082236 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..d2c771d480 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md new file mode 100644 index 0000000000..1d0ec43066 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..71bd038edb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md new file mode 100644 index 0000000000..c8b0558250 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..eb71dddd1a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f80d6a4b1d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..36943f2fa0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md new file mode 100644 index 0000000000..c7f068604b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..0ec96db2f8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md new file mode 100644 index 0000000000..9c1dc4a5dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..9d59bb3646 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +import { Client, Messaging, SmtpEncryption } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..052d394f05 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..2163792f83 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md new file mode 100644 index 0000000000..5f7f77901b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..5abdd65a9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..c8fa90d9ab --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md new file mode 100644 index 0000000000..f674553a10 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createDeployment( + '<SITE_ID>', // siteId + InputFile.fromPath('/path/to/file.png', 'file.png'), // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..317e80b312 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..4ef245bd16 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md new file mode 100644 index 0000000000..7b07a088ce --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..5c49808811 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import { Client, Sites, VCSDeploymentType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create.md b/docs/examples/1.8.x/server-deno/examples/sites/create.md new file mode 100644 index 0000000000..420b36290b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create.md @@ -0,0 +1,29 @@ +import { Client, Sites, , , } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + .Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..cd97673387 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md new file mode 100644 index 0000000000..0b70eb30b6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md new file mode 100644 index 0000000000..0bbc2e33dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete.md b/docs/examples/1.8.x/server-deno/examples/sites/delete.md new file mode 100644 index 0000000000..af5dbed3f2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.delete( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..4c3ceca8ae --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +import { Client, Sites, DeploymentDownloadType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const result = sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md new file mode 100644 index 0000000000..4e614b0de9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-log.md b/docs/examples/1.8.x/server-deno/examples/sites/get-log.md new file mode 100644 index 0000000000..9495030fa3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-log.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md new file mode 100644 index 0000000000..12ab553026 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get.md b/docs/examples/1.8.x/server-deno/examples/sites/get.md new file mode 100644 index 0000000000..769f426d1e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.get( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md new file mode 100644 index 0000000000..09cc52194f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-deno/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..5623960463 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listFrameworks(); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md b/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md new file mode 100644 index 0000000000..3249903c07 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-deno/examples/sites/list-specifications.md new file mode 100644 index 0000000000..a1b0b334ed --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listSpecifications(); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md b/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md new file mode 100644 index 0000000000..0aac319816 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listVariables( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list.md b/docs/examples/1.8.x/server-deno/examples/sites/list.md new file mode 100644 index 0000000000..f21433d794 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..83fe6f85a0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..1d9d697d39 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md new file mode 100644 index 0000000000..6776af7a65 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update.md b/docs/examples/1.8.x/server-deno/examples/sites/update.md new file mode 100644 index 0000000000..ba7d195cd3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update.md @@ -0,0 +1,29 @@ +import { Client, Sites, , , } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Node145, // buildRuntime (optional) + .Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md new file mode 100644 index 0000000000..e7d3e9006a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import { Client, Storage, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/create-file.md b/docs/examples/1.8.x/server-deno/examples/storage/create-file.md new file mode 100644 index 0000000000..d8912c6c1e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + InputFile.fromPath('/path/to/file.png', 'file.png'), // file + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..f0d71467d4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md b/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md new file mode 100644 index 0000000000..2a1f95ed18 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md new file mode 100644 index 0000000000..a695021b72 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md new file mode 100644 index 0000000000..df11f40b80 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..6457c7831b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md new file mode 100644 index 0000000000..5a1dbac86a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file.md new file mode 100644 index 0000000000..5479dc569d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md new file mode 100644 index 0000000000..9286bd488c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/list-files.md b/docs/examples/1.8.x/server-deno/examples/storage/list-files.md new file mode 100644 index 0000000000..316875cf51 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md new file mode 100644 index 0000000000..1e70f16ef3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import { Client, Storage, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/update-file.md b/docs/examples/1.8.x/server-deno/examples/storage/update-file.md new file mode 100644 index 0000000000..683b0b7304 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..3f9abc8c05 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..898b67a787 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md new file mode 100644 index 0000000000..82872e4087 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..afbb8d00aa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md new file mode 100644 index 0000000000..44658bbaa9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md new file mode 100644 index 0000000000..c255189881 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md @@ -0,0 +1,18 @@ +import { Client, Tables, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..0f1721b24a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..ca96de6293 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8c7e26e62c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +import { Client, Tables, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-row.md b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md new file mode 100644 index 0000000000..12cec49af0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const response = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md new file mode 100644 index 0000000000..6c4f7d5627 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md new file mode 100644 index 0000000000..db7ac8a760 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md new file mode 100644 index 0000000000..8d6f127c00 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create.md b/docs/examples/1.8.x/server-deno/examples/tables/create.md new file mode 100644 index 0000000000..9c75c22c3d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..e561acc529 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md new file mode 100644 index 0000000000..89900bfbf0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md new file mode 100644 index 0000000000..a17791cef2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md new file mode 100644 index 0000000000..8f30eae2d2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md new file mode 100644 index 0000000000..c5aa88f9a2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete.md b/docs/examples/1.8.x/server-deno/examples/tables/delete.md new file mode 100644 index 0000000000..36df1373dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-column.md b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md new file mode 100644 index 0000000000..8a56af67e7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-index.md b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md new file mode 100644 index 0000000000..61105dc661 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-row.md b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md new file mode 100644 index 0000000000..674ea3e648 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get.md b/docs/examples/1.8.x/server-deno/examples/tables/get.md new file mode 100644 index 0000000000..cc1dcb8c51 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..9779d8776e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md new file mode 100644 index 0000000000..63ec0777bb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md new file mode 100644 index 0000000000..587d19f362 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md new file mode 100644 index 0000000000..6db6bea439 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list.md b/docs/examples/1.8.x/server-deno/examples/tables/list.md new file mode 100644 index 0000000000..d4da8409c9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..8710c27ede --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..e1ca760e31 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md new file mode 100644 index 0000000000..b0e25348d4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..8771213a79 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md new file mode 100644 index 0000000000..a2e6f55c1f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..51ea17f943 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..4a5a1d0f81 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..c83b82037a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +import { Client, Tables, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-row.md b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md new file mode 100644 index 0000000000..13da5615e7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md new file mode 100644 index 0000000000..1bc0a18b98 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md new file mode 100644 index 0000000000..00dd310b1e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2ebf80a356 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update.md b/docs/examples/1.8.x/server-deno/examples/tables/update.md new file mode 100644 index 0000000000..43b51bd284 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md new file mode 100644 index 0000000000..45e932c7f6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const response = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..9e3f542051 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md new file mode 100644 index 0000000000..d8e855f852 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/create.md b/docs/examples/1.8.x/server-deno/examples/teams/create.md new file mode 100644 index 0000000000..495f26e006 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/create.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md new file mode 100644 index 0000000000..a5b03875d5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/delete.md b/docs/examples/1.8.x/server-deno/examples/teams/delete.md new file mode 100644 index 0000000000..556fbb5ea5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/delete.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.delete( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md new file mode 100644 index 0000000000..75283bffc7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md new file mode 100644 index 0000000000..442d8b139a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.getPrefs( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get.md b/docs/examples/1.8.x/server-deno/examples/teams/get.md new file mode 100644 index 0000000000..2e5803ca7b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/get.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.get( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md new file mode 100644 index 0000000000..0b7e6638e6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/list.md b/docs/examples/1.8.x/server-deno/examples/teams/list.md new file mode 100644 index 0000000000..6c08b5c80a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/list.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..48fc9cd8be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md new file mode 100644 index 0000000000..be8651d724 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-name.md b/docs/examples/1.8.x/server-deno/examples/teams/update-name.md new file mode 100644 index 0000000000..6e2144b897 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md new file mode 100644 index 0000000000..dea8a368c4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..7c24738cb5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/delete.md b/docs/examples/1.8.x/server-deno/examples/tokens/delete.md new file mode 100644 index 0000000000..b5e3adfa35 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/delete.md @@ -0,0 +1,12 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.delete( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/get.md b/docs/examples/1.8.x/server-deno/examples/tokens/get.md new file mode 100644 index 0000000000..2bb827d870 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/get.md @@ -0,0 +1,12 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.get( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/list.md b/docs/examples/1.8.x/server-deno/examples/tokens/list.md new file mode 100644 index 0000000000..7208a53553 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/list.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/update.md b/docs/examples/1.8.x/server-deno/examples/tokens/update.md new file mode 100644 index 0000000000..4464a0ccf8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/update.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.update( + '<TOKEN_ID>', // tokenId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md new file mode 100644 index 0000000000..7a6e0fb144 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..ddfb7f3b12 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..4c433aebdd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..8cc63cedbd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..98ba71a845 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..750b299074 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..e243a1d6ee --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +import { Client, Users, PasswordHash } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..0d6a65b8b4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..87f2dbb09e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-session.md b/docs/examples/1.8.x/server-deno/examples/users/create-session.md new file mode 100644 index 0000000000..37d6948942 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-session.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createSession( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-target.md b/docs/examples/1.8.x/server-deno/examples/users/create-target.md new file mode 100644 index 0000000000..a36072a5de --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-target.md @@ -0,0 +1,17 @@ +import { Client, Users, MessagingProviderType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-token.md b/docs/examples/1.8.x/server-deno/examples/users/create-token.md new file mode 100644 index 0000000000..91885e15f3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-token.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create.md b/docs/examples/1.8.x/server-deno/examples/users/create.md new file mode 100644 index 0000000000..e0eb5856d1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create.md @@ -0,0 +1,16 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md b/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md new file mode 100644 index 0000000000..7aea654645 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..2d7595005e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Users, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-session.md b/docs/examples/1.8.x/server-deno/examples/users/delete-session.md new file mode 100644 index 0000000000..0ce82fe50f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md new file mode 100644 index 0000000000..f80300b205 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-target.md b/docs/examples/1.8.x/server-deno/examples/users/delete-target.md new file mode 100644 index 0000000000..9080a962e6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-target.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete.md b/docs/examples/1.8.x/server-deno/examples/users/delete.md new file mode 100644 index 0000000000..7ac1bf1d3a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.delete( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..f78c0bf1b0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md new file mode 100644 index 0000000000..ef1be1e18b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getPrefs( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-target.md b/docs/examples/1.8.x/server-deno/examples/users/get-target.md new file mode 100644 index 0000000000..301ee6e7ed --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get-target.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get.md b/docs/examples/1.8.x/server-deno/examples/users/get.md new file mode 100644 index 0000000000..8e41ed6350 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.get( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-identities.md b/docs/examples/1.8.x/server-deno/examples/users/list-identities.md new file mode 100644 index 0000000000..6ac439547b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-logs.md b/docs/examples/1.8.x/server-deno/examples/users/list-logs.md new file mode 100644 index 0000000000..983ffba299 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md b/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md new file mode 100644 index 0000000000..afdd4d4f2d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..34b65afac3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listMfaFactors( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md b/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md new file mode 100644 index 0000000000..314f277d7a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-targets.md b/docs/examples/1.8.x/server-deno/examples/users/list-targets.md new file mode 100644 index 0000000000..9ed2dda4ce --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-targets.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list.md b/docs/examples/1.8.x/server-deno/examples/users/list.md new file mode 100644 index 0000000000..488fbdc09c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md new file mode 100644 index 0000000000..3243f21c6f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-email.md b/docs/examples/1.8.x/server-deno/examples/users/update-email.md new file mode 100644 index 0000000000..f609cab463 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-email.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-labels.md b/docs/examples/1.8.x/server-deno/examples/users/update-labels.md new file mode 100644 index 0000000000..5a23298179 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-labels.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a74577e9cc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md b/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md new file mode 100644 index 0000000000..717f8d6ab7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-name.md b/docs/examples/1.8.x/server-deno/examples/users/update-name.md new file mode 100644 index 0000000000..35fc853e3f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-name.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-password.md b/docs/examples/1.8.x/server-deno/examples/users/update-password.md new file mode 100644 index 0000000000..8366b5c4c2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-password.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..088fd1eb57 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-phone.md b/docs/examples/1.8.x/server-deno/examples/users/update-phone.md new file mode 100644 index 0000000000..a8e47a62b8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-phone.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md new file mode 100644 index 0000000000..cb8919a98f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-status.md b/docs/examples/1.8.x/server-deno/examples/users/update-status.md new file mode 100644 index 0000000000..1c672a4d25 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-status.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateStatus( + '<USER_ID>', // userId + false // status +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-target.md b/docs/examples/1.8.x/server-deno/examples/users/update-target.md new file mode 100644 index 0000000000..4524748c55 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-target.md @@ -0,0 +1,16 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..fc807aa4e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateAnonymousSession(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..abf5a41317 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateEmailPasswordSession( + email: "email@example.com", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-email-token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-token.md new file mode 100644 index 0000000000..69862feed0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreateEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..423cbed2b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +JWT result = await account.CreateJWT(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..21bcef6bed --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..bc54970469 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaType result = await account.CreateMfaAuthenticator( + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..734133f2bd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +MfaChallenge result = await account.CreateMfaChallenge( + factor: AuthenticationFactor.Email +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..1922a45c0a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.CreateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..5b405449b1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +await account.CreateOAuth2Token( + provider: OAuthProvider.Amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-token.md new file mode 100644 index 0000000000..0d17f5ecee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreatePhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..185fc46e0d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreatePhoneVerification(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-recovery.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-recovery.md new file mode 100644 index 0000000000..c2e3571d56 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreateRecovery( + email: "email@example.com", + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-session.md new file mode 100644 index 0000000000..2da46ce62b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-verification.md new file mode 100644 index 0000000000..92222ea88a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreateVerification( + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create.md b/docs/examples/1.8.x/server-dotnet/examples/account/create.md new file mode 100644 index 0000000000..83c1d54251 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +User result = await account.Create( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-identity.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-identity.md new file mode 100644 index 0000000000..9b084800d4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..2b27cb6ad8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteMfaAuthenticator( + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-session.md new file mode 100644 index 0000000000..0bca7c172a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-sessions.md new file mode 100644 index 0000000000..5b0e7b5cba --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteSessions(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..cc39db191d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.GetMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/account/get-prefs.md new file mode 100644 index 0000000000..b0fce89a3f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Preferences result = await account.GetPrefs(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/get-session.md new file mode 100644 index 0000000000..9aa7abaee0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.GetSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get.md b/docs/examples/1.8.x/server-dotnet/examples/account/get.md new file mode 100644 index 0000000000..eecb890b30 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.Get(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-identities.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-identities.md new file mode 100644 index 0000000000..661fab9f4e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-identities.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +IdentityList result = await account.ListIdentities( + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-logs.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-logs.md new file mode 100644 index 0000000000..8e5eadf961 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-logs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +LogList result = await account.ListLogs( + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..291534920f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaFactors result = await account.ListMfaFactors(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-sessions.md new file mode 100644 index 0000000000..6304383cb3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +SessionList result = await account.ListSessions(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-email.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-email.md new file mode 100644 index 0000000000..06e2a2a9df --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-email.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateEmail( + email: "email@example.com", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..b9405e7e2c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateMFA( + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..a8d8312e18 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.UpdateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..051653d19a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateMfaAuthenticator( + type: AuthenticatorType.Totp, + otp: "<OTP>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..d273505839 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.UpdateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..7daaf93213 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.UpdateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-name.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-name.md new file mode 100644 index 0000000000..6088226fc8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-name.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateName( + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-password.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-password.md new file mode 100644 index 0000000000..f24c703a9a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-password.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePassword( + password: "", + oldPassword: "password" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-session.md new file mode 100644 index 0000000000..2f8b091999 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.UpdatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..a100c0f2e2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-phone.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone.md new file mode 100644 index 0000000000..224001dd6e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePhone( + phone: "+12065550100", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-prefs.md new file mode 100644 index 0000000000..0b348a9c74 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePrefs( + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-recovery.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-recovery.md new file mode 100644 index 0000000000..188462229b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-session.md new file mode 100644 index 0000000000..a98644c032 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.UpdateSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-status.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-status.md new file mode 100644 index 0000000000..d9c5b41d72 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-status.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateStatus(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-verification.md new file mode 100644 index 0000000000..b9dd1ded40 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 0000000000..9c7b643af1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetBrowser( + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..a41ade1438 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetCreditCard( + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..345d856717 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetFavicon( + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 0000000000..f7a3e05cee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetFlag( + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-image.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 0000000000..4a67e58517 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 0000000000..55427ff622 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..4591b7d99c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..8807648521 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.CreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md new file mode 100644 index 0000000000..75a1c5c311 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.CreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..7be723379e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.CreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md new file mode 100644 index 0000000000..cb4bc62ced --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +Document result = await databases.CreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md new file mode 100644 index 0000000000..c46715b25d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DocumentList result = await databases.CreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..df00119ff9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.CreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d85e8a72a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.CreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..bc03fac7ae --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.CreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-index.md new file mode 100644 index 0000000000..ae5583c68d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Index result = await databases.CreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: IndexType.Key, + attributes: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..c8e7c13355 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.CreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..f95c257089 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeIp result = await databases.CreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..b0f4d1194f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.CreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..6cba31ff36 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeString result = await databases.CreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..dce1ac496a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.CreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create.md new file mode 100644 index 0000000000..9b66c15cef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..c327458f61 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Document result = await databases.DecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..46eb44b4b8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-collection.md new file mode 100644 index 0000000000..e05717dc6c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-document.md new file mode 100644 index 0000000000..221b80e254 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-document.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +await databases.DeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-documents.md new file mode 100644 index 0000000000..a9bc9c277b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-documents.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-index.md new file mode 100644 index 0000000000..02dcf5c66a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete.md new file mode 100644 index 0000000000..a877eabc02 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.Delete( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-attribute.md new file mode 100644 index 0000000000..d9e02e36b6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + + result = await databases.GetAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-collection.md new file mode 100644 index 0000000000..79fe685cbc --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.GetCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-document.md new file mode 100644 index 0000000000..d7e9b68807 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-document.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.GetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-index.md new file mode 100644 index 0000000000..02f7b812c8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Index result = await databases.GetIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get.md new file mode 100644 index 0000000000..174d74c4f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Get( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..be52584aaf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Document result = await databases.IncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-attributes.md new file mode 100644 index 0000000000..d2ac6c3afd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-attributes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeList result = await databases.ListAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-collections.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-collections.md new file mode 100644 index 0000000000..5dacb62e97 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-collections.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +CollectionList result = await databases.ListCollections( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-documents.md new file mode 100644 index 0000000000..f59e4576bd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-documents.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +DocumentList result = await databases.ListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-indexes.md new file mode 100644 index 0000000000..e6adab1f2d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +IndexList result = await databases.ListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list.md new file mode 100644 index 0000000000..d2b552b27c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DatabaseList result = await databases.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..aa2ed498d2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.UpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md new file mode 100644 index 0000000000..7885ad3969 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.UpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..e6b60c8753 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.UpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md new file mode 100644 index 0000000000..3121c15e08 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.UpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-documents.md new file mode 100644 index 0000000000..63ded21ac9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-documents.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DocumentList result = await databases.UpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8d36a43780 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.UpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..e3ca9fe124 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.UpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..46328d26f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.UpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..91ff1897c7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.UpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..dfcb5d214a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeIp result = await databases.UpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..5b6dd71467 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.UpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..918fdc0e3f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeString result = await databases.UpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..8766a3f2f7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.UpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update.md new file mode 100644 index 0000000000..d4dd28aa2b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c809a497fe --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +Document result = await databases.UpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..48c0aa7044 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DocumentList result = await databases.UpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-deployment.md new file mode 100644 index 0000000000..26c6ff4c42 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..057fe12b10 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md new file mode 100644 index 0000000000..c8fd5595e9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +Execution result = await functions.CreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: ExecutionMethod.GET, // optional + headers: [object], // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..019a9bf256 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-variable.md new file mode 100644 index 0000000000..6d1f85b12e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.CreateVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..9651365912 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: VCSDeploymentType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create.md new file mode 100644 index 0000000000..6e705228f1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .Node145, + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<string>(), // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..33c537ad0d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-execution.md new file mode 100644 index 0000000000..5d5ab8dee2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-variable.md new file mode 100644 index 0000000000..263c3f6420 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete.md new file mode 100644 index 0000000000..ed780ac15a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.Delete( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..bfc3209635 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment-download.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +byte[] result = await functions.GetDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment.md new file mode 100644 index 0000000000..5fe31a2f6e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.GetDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-execution.md new file mode 100644 index 0000000000..8581b968af --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +Execution result = await functions.GetExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-variable.md new file mode 100644 index 0000000000..57ba993389 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.GetVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get.md new file mode 100644 index 0000000000..baba5d0b4a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Get( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-deployments.md new file mode 100644 index 0000000000..093befcf61 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +DeploymentList result = await functions.ListDeployments( + functionId: "<FUNCTION_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-executions.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-executions.md new file mode 100644 index 0000000000..6ec320eb7a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +ExecutionList result = await functions.ListExecutions( + functionId: "<FUNCTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..c238671670 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +RuntimeList result = await functions.ListRuntimes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-specifications.md new file mode 100644 index 0000000000..2d868d1343 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-specifications.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +SpecificationList result = await functions.ListSpecifications(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-variables.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-variables.md new file mode 100644 index 0000000000..4c85da8995 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +VariableList result = await functions.ListVariables( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list.md new file mode 100644 index 0000000000..750642d498 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +FunctionList result = await functions.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..4dd70b1932 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.UpdateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..7bdbd91b5c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.UpdateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update-variable.md new file mode 100644 index 0000000000..2b776d69ea --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.UpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update.md new file mode 100644 index 0000000000..7160795f77 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .Node145, // optional + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<string>(), // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/graphql/mutation.md b/docs/examples/1.8.x/server-dotnet/examples/graphql/mutation.md new file mode 100644 index 0000000000..b153e34d51 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Mutation( + query: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/graphql/query.md b/docs/examples/1.8.x/server-dotnet/examples/graphql/query.md new file mode 100644 index 0000000000..61345d7665 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/graphql/query.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Query( + query: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-antivirus.md new file mode 100644 index 0000000000..115c0e5c7b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthAntivirus result = await health.GetAntivirus(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-cache.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-cache.md new file mode 100644 index 0000000000..0c5ec37c2b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-cache.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetCache(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-certificate.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-certificate.md new file mode 100644 index 0000000000..457b70128a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-certificate.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthCertificate result = await health.GetCertificate( + domain: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md new file mode 100644 index 0000000000..7ae8b14854 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetDB(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..4d43479831 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetFailedJobs( + name: .V1Database, + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..4ffdd7e531 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-pub-sub.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetPubSub(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..5d522f03f2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-builds.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueBuilds( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..c7e186e5ee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueCertificates( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..1db6fb518c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-databases.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueDatabases( + name: "<NAME>", // optional + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..487cee3411 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueDeletes( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..949e3766a7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueFunctions( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..58ad1ac2fe --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueLogs( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..2c1008c7b1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-mails.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMails( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..4116f19b1f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMessaging( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..5a0c7a0337 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMigrations( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..4002cca158 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueStatsResources( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..546e9a07de --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-usage.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueUsage( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..1fc8d4d63c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueWebhooks( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage-local.md new file mode 100644 index 0000000000..3e8539794a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetStorageLocal(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-storage.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage.md new file mode 100644 index 0000000000..42d4aba45b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetStorage(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-time.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-time.md new file mode 100644 index 0000000000..959060113b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-time.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthTime result = await health.GetTime(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get.md b/docs/examples/1.8.x/server-dotnet/examples/health/get.md new file mode 100644 index 0000000000..a926fe71e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.Get(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/get.md b/docs/examples/1.8.x/server-dotnet/examples/locale/get.md new file mode 100644 index 0000000000..48b9701801 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +Locale result = await locale.Get(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-codes.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-codes.md new file mode 100644 index 0000000000..0df7696da5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +LocaleCodeList result = await locale.ListCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-continents.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-continents.md new file mode 100644 index 0000000000..7cf74caec3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +ContinentList result = await locale.ListContinents(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..106e140ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountriesEU(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..38fbe24ff3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +PhoneList result = await locale.ListCountriesPhones(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries.md new file mode 100644 index 0000000000..5e5d9f407f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountries(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e51a138813 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CurrencyList result = await locale.ListCurrencies(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-languages.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-languages.md new file mode 100644 index 0000000000..62aa15d1d9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +LanguageList result = await locale.ListLanguages(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..9cc37a17e0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-email.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-email.md new file mode 100644 index 0000000000..51c6db4ddb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-email.md @@ -0,0 +1,25 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + cc: new List<string>(), // optional + bcc: new List<string>(), // optional + attachments: new List<string>(), // optional + draft: false, // optional + html: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..15fdace2d3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [object], // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..1bacbab8d5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..a0b7372709 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-push.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-push.md new file mode 100644 index 0000000000..1d2dbec1f2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + data: [object], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..8464c47ae1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sms.md new file mode 100644 index 0000000000..06e9e69e65 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sms.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + draft: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..16b091f98e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..8b37d31e68 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +Subscriber result = await messaging.CreateSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..37e1bd1df9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..7dc0a6b26f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-topic.md new file mode 100644 index 0000000000..51eab0fd11 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.CreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..0deba742ff --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..8f4855aab4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..a1ca2a1450 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-provider.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.DeleteProvider( + providerId: "<PROVIDER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..9424535c9f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +await messaging.DeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..0b4819a219 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-topic.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.DeleteTopic( + topicId: "<TOPIC_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete.md new file mode 100644 index 0000000000..ff041e853a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.Delete( + messageId: "<MESSAGE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-message.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-message.md new file mode 100644 index 0000000000..0dad3668f8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-message.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.GetMessage( + messageId: "<MESSAGE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-provider.md new file mode 100644 index 0000000000..fac5a07da5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-provider.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.GetProvider( + providerId: "<PROVIDER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..516aa682c8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Subscriber result = await messaging.GetSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-topic.md new file mode 100644 index 0000000000..3a662b3111 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-topic.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.GetTopic( + topicId: "<TOPIC_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..49d3513127 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListMessageLogs( + messageId: "<MESSAGE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-messages.md new file mode 100644 index 0000000000..4c17128e72 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-messages.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +MessageList result = await messaging.ListMessages( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..928c14845a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListProviderLogs( + providerId: "<PROVIDER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-providers.md new file mode 100644 index 0000000000..6cf5757fb6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-providers.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +ProviderList result = await messaging.ListProviders( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..815f1325d4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListSubscriberLogs( + subscriberId: "<SUBSCRIBER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..b522be327c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +SubscriberList result = await messaging.ListSubscribers( + topicId: "<TOPIC_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-targets.md new file mode 100644 index 0000000000..a8e8de567e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-targets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +TargetList result = await messaging.ListTargets( + messageId: "<MESSAGE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..093db0ff2c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListTopicLogs( + topicId: "<TOPIC_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topics.md new file mode 100644 index 0000000000..cc88afab69 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topics.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +TopicList result = await messaging.ListTopics( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..f06e134d02 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-email.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-email.md new file mode 100644 index 0000000000..90d1555d8f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-email.md @@ -0,0 +1,25 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateEmail( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional + draft: false, // optional + html: false, // optional + cc: new List<string>(), // optional + bcc: new List<string>(), // optional + scheduledAt: "", // optional + attachments: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..0006fedf54 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [object] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..512cb0586b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..51355c5836 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-push.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-push.md new file mode 100644 index 0000000000..37da215e82 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdatePush( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + title: "<TITLE>", // optional + body: "<BODY>", // optional + data: [object], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..d718a7158b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sms.md new file mode 100644 index 0000000000..475d29923d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sms.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateSms( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + content: "<CONTENT>", // optional + draft: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..4e7ab6dfeb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..d4f1c5e015 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..3529f9b99c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-topic.md new file mode 100644 index 0000000000..11943f70e2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.UpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..66fc7e27a3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..03addd3de6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-deployment.md new file mode 100644 index 0000000000..1bcb5d5bac --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateDeployment( + siteId: "<SITE_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false, + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..1e45aca8ef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..57f9a83d9c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-variable.md new file mode 100644 index 0000000000..09feb0316e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.CreateVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..4d3e685176 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateVcsDeployment( + siteId: "<SITE_ID>", + type: VCSDeploymentType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create.md new file mode 100644 index 0000000000..025adca41d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .Analog, + buildRuntime: .Node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: .Static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..f74be24acf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete-log.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-log.md new file mode 100644 index 0000000000..83d1aa12ca --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-variable.md new file mode 100644 index 0000000000..9751512718 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete.md new file mode 100644 index 0000000000..173c486499 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.Delete( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..27c9647629 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment-download.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +byte[] result = await sites.GetDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment.md new file mode 100644 index 0000000000..138c97ba42 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.GetDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-log.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-log.md new file mode 100644 index 0000000000..d90b6c8477 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-log.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Execution result = await sites.GetLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-variable.md new file mode 100644 index 0000000000..01f57f3bf2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.GetVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get.md new file mode 100644 index 0000000000..87a91ae8e8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Get( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-deployments.md new file mode 100644 index 0000000000..ac1cae9127 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-deployments.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +DeploymentList result = await sites.ListDeployments( + siteId: "<SITE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..9220b2a7da --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-frameworks.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +FrameworkList result = await sites.ListFrameworks(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-logs.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-logs.md new file mode 100644 index 0000000000..692bd707b2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +ExecutionList result = await sites.ListLogs( + siteId: "<SITE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-specifications.md new file mode 100644 index 0000000000..edf82da81b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-specifications.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +SpecificationList result = await sites.ListSpecifications(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-variables.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-variables.md new file mode 100644 index 0000000000..6eb0ff7093 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-variables.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +VariableList result = await sites.ListVariables( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list.md new file mode 100644 index 0000000000..649ee50331 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +SiteList result = await sites.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..c7415e7a0b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.UpdateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..8706ff594a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.UpdateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update-variable.md new file mode 100644 index 0000000000..99718cd6cd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.UpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update.md new file mode 100644 index 0000000000..c25e3f6df9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .Analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: .Node145, // optional + adapter: .Static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md new file mode 100644 index 0000000000..0cc317d9a6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.CreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: .None, // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md new file mode 100644 index 0000000000..a4cedb8214 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.CreateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.FromPath("./path-to-files/image.jpg"), + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..22aa2acf19 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +await storage.DeleteBucket( + bucketId: "<BUCKET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/delete-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 0000000000..a8cc310aa5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +await storage.DeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-bucket.md new file mode 100644 index 0000000000..a6f74ebdae --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.GetBucket( + bucketId: "<BUCKET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 0000000000..514fda9e9c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c9ec508b4a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.Center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: ImageFormat.Jpg, // optional + token: "<TOKEN>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 0000000000..1a27dc153c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file.md new file mode 100644 index 0000000000..e4c05c1e6b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.GetFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-dotnet/examples/storage/list-buckets.md new file mode 100644 index 0000000000..8e397729e6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/list-buckets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +BucketList result = await storage.ListBuckets( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/list-files.md b/docs/examples/1.8.x/server-dotnet/examples/storage/list-files.md new file mode 100644 index 0000000000..2751da5244 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/list-files.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +FileList result = await storage.ListFiles( + bucketId: "<BUCKET_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md new file mode 100644 index 0000000000..2a439ba2af --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.UpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: .None, // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md new file mode 100644 index 0000000000..3f6ea608d7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.UpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..1492487721 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnBoolean result = await tables.CreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..6a1e07b907 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnDatetime result = await tables.CreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md new file mode 100644 index 0000000000..a4740484f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEmail result = await tables.CreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..9529ad1331 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEnum result = await tables.CreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md new file mode 100644 index 0000000000..f8146ce272 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnFloat result = await tables.CreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md new file mode 100644 index 0000000000..4ea3817da2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndex result = await tables.CreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: IndexType.Key, + columns: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..6090426792 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnInteger result = await tables.CreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..b5e5067e6f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIp result = await tables.CreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..7c4cba49dd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnRelationship result = await tables.CreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md new file mode 100644 index 0000000000..642bfe457c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +Row result = await tables.CreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md new file mode 100644 index 0000000000..1d44dc51ed --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.CreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e623ac0789 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnString result = await tables.CreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md new file mode 100644 index 0000000000..7a0fbd0a83 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnUrl result = await tables.CreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md new file mode 100644 index 0000000000..694f4101a7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Create( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..220fb2b18a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Row result = await tables.DecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md new file mode 100644 index 0000000000..ca8987eec9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md new file mode 100644 index 0000000000..ba7a024167 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md new file mode 100644 index 0000000000..95bae6ad6b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +await tables.DeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md new file mode 100644 index 0000000000..46a6e0ba94 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md new file mode 100644 index 0000000000..bcff3ea05a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.Delete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md new file mode 100644 index 0000000000..71ebb81aef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + + result = await tables.GetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md new file mode 100644 index 0000000000..f5b886e3e9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndex result = await tables.GetIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md new file mode 100644 index 0000000000..474b3342c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +Row result = await tables.GetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md new file mode 100644 index 0000000000..1e86d228a6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Get( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..e8ccd8ca78 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Row result = await tables.IncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md new file mode 100644 index 0000000000..fe8c739cf9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnList result = await tables.ListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md new file mode 100644 index 0000000000..907a21048f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndexList result = await tables.ListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md new file mode 100644 index 0000000000..474c597a1c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +RowList result = await tables.ListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md new file mode 100644 index 0000000000..2871a927c4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +TableList result = await tables.List( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..5c610fbe7a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnBoolean result = await tables.UpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..754d0f1ae6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnDatetime result = await tables.UpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md new file mode 100644 index 0000000000..6000c54e8f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEmail result = await tables.UpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..2eaa1a51a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEnum result = await tables.UpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md new file mode 100644 index 0000000000..7d18d8e624 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnFloat result = await tables.UpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..0b3b85652c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnInteger result = await tables.UpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..ccdd0d5235 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIp result = await tables.UpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..be6aa31f73 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnRelationship result = await tables.UpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md new file mode 100644 index 0000000000..d049ccf805 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +Row result = await tables.UpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md new file mode 100644 index 0000000000..9d2c51c4b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.UpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md new file mode 100644 index 0000000000..da280e7d8c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnString result = await tables.UpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md new file mode 100644 index 0000000000..1ce961da2b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnUrl result = await tables.UpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md new file mode 100644 index 0000000000..584c61c6bb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Update( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md new file mode 100644 index 0000000000..a73c4e2402 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +Row result = await tables.UpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..07e5e927c6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.UpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/create-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/create-membership.md new file mode 100644 index 0000000000..f3f5682cbf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.CreateMembership( + teamId: "<TEAM_ID>", + roles: new List<string>(), + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/create.md b/docs/examples/1.8.x/server-dotnet/examples/teams/create.md new file mode 100644 index 0000000000..07b102d70a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.Create( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 0000000000..01a58aaa11 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +await teams.DeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/delete.md b/docs/examples/1.8.x/server-dotnet/examples/teams/delete.md new file mode 100644 index 0000000000..ee525f23c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +await teams.Delete( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/get-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/get-membership.md new file mode 100644 index 0000000000..cb9109df14 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.GetMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/teams/get-prefs.md new file mode 100644 index 0000000000..f95d73af77 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Preferences result = await teams.GetPrefs( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/get.md b/docs/examples/1.8.x/server-dotnet/examples/teams/get.md new file mode 100644 index 0000000000..339b33f657 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.Get( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-dotnet/examples/teams/list-memberships.md new file mode 100644 index 0000000000..6072158100 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/list-memberships.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +MembershipList result = await teams.ListMemberships( + teamId: "<TEAM_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/list.md b/docs/examples/1.8.x/server-dotnet/examples/teams/list.md new file mode 100644 index 0000000000..b1ca72b82e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +TeamList result = await teams.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..87609aa32e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership-status.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership.md new file mode 100644 index 0000000000..3583b4d0a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: new List<string>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-name.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-name.md new file mode 100644 index 0000000000..9a3fb1316a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-name.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.UpdateName( + teamId: "<TEAM_ID>", + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-prefs.md new file mode 100644 index 0000000000..55ff96e9e8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Preferences result = await teams.UpdatePrefs( + teamId: "<TEAM_ID>", + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..70f4ed3900 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.CreateFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/delete.md new file mode 100644 index 0000000000..e88147c1c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +await tokens.Delete( + tokenId: "<TOKEN_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/get.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/get.md new file mode 100644 index 0000000000..da9b431017 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.Get( + tokenId: "<TOKEN_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/list.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/list.md new file mode 100644 index 0000000000..68579f237b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/list.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceTokenList result = await tokens.List( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/update.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/update.md new file mode 100644 index 0000000000..b7604182ab --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/update.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.Update( + tokenId: "<TOKEN_ID>", + expire: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md new file mode 100644 index 0000000000..db6dd6486a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..bf8bf3dedd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..a7c57ad642 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +JWT result = await users.CreateJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", // optional + duration: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..7b7d0e7760 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..9b43dc02af --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.CreateMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..9f5521ef2f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..0821bf46e9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: PasswordHash.Sha1, // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..3af99e88c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..79085f7206 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-session.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-session.md new file mode 100644 index 0000000000..a021c2551f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Session result = await users.CreateSession( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-target.md new file mode 100644 index 0000000000..44ba48ac01 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-target.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.CreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: MessagingProviderType.Email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-token.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-token.md new file mode 100644 index 0000000000..0e9cf43fd7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Token result = await users.CreateToken( + userId: "<USER_ID>", + length: 4, // optional + expire: 60 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create.md b/docs/examples/1.8.x/server-dotnet/examples/users/create.md new file mode 100644 index 0000000000..3cf1d3af29 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.Create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-identity.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-identity.md new file mode 100644 index 0000000000..d2bac6b797 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..bb33dbf9e4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteMfaAuthenticator( + userId: "<USER_ID>", + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-session.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-session.md new file mode 100644 index 0000000000..d9d36d20b4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 0000000000..7011e426bb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteSessions( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-target.md new file mode 100644 index 0000000000..ad900afa5a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-target.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete.md new file mode 100644 index 0000000000..00ed23cf5f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.Delete( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..213c3473a8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.GetMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/users/get-prefs.md new file mode 100644 index 0000000000..36888651d9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Preferences result = await users.GetPrefs( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/get-target.md new file mode 100644 index 0000000000..2bbf4d614c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get-target.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.GetTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get.md b/docs/examples/1.8.x/server-dotnet/examples/users/get.md new file mode 100644 index 0000000000..25971baddc --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.Get( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-identities.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-identities.md new file mode 100644 index 0000000000..996edfba71 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-identities.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +IdentityList result = await users.ListIdentities( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-logs.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-logs.md new file mode 100644 index 0000000000..822d16fe64 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +LogList result = await users.ListLogs( + userId: "<USER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-memberships.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-memberships.md new file mode 100644 index 0000000000..4296cd2dcd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-memberships.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MembershipList result = await users.ListMemberships( + userId: "<USER_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..54f68ae516 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaFactors result = await users.ListMfaFactors( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-sessions.md new file mode 100644 index 0000000000..97f92f3b07 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +SessionList result = await users.ListSessions( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-targets.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-targets.md new file mode 100644 index 0000000000..aa59ce2983 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-targets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +TargetList result = await users.ListTargets( + userId: "<USER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list.md b/docs/examples/1.8.x/server-dotnet/examples/users/list.md new file mode 100644 index 0000000000..aae7ae27b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +UserList result = await users.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-email-verification.md new file mode 100644 index 0000000000..8add2d4d6b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateEmailVerification( + userId: "<USER_ID>", + emailVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-email.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-email.md new file mode 100644 index 0000000000..d0d737cb80 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-email.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateEmail( + userId: "<USER_ID>", + email: "email@example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-labels.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-labels.md new file mode 100644 index 0000000000..6637ad0438 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-labels.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateLabels( + userId: "<USER_ID>", + labels: new List<string>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..35be70777a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.UpdateMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa.md new file mode 100644 index 0000000000..d009df1759 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateMfa( + userId: "<USER_ID>", + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-name.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-name.md new file mode 100644 index 0000000000..ffa90f9657 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-name.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateName( + userId: "<USER_ID>", + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-password.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-password.md new file mode 100644 index 0000000000..6dc30d5bcf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-password.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePassword( + userId: "<USER_ID>", + password: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..ba5ca253ee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-phone.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone.md new file mode 100644 index 0000000000..e633740e94 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePhone( + userId: "<USER_ID>", + number: "+12065550100" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-prefs.md new file mode 100644 index 0000000000..421a4c2314 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Preferences result = await users.UpdatePrefs( + userId: "<USER_ID>", + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-status.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-status.md new file mode 100644 index 0000000000..3037d8dd0c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateStatus( + userId: "<USER_ID>", + status: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-target.md new file mode 100644 index 0000000000..9863af19d8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-target.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.UpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..ff8aea9751 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateAnonymousSession( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..18d8dbc184 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateEmailPasswordSession( + "email@example.com", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-email-token.md b/docs/examples/1.8.x/server-go/examples/account/create-email-token.md new file mode 100644 index 0000000000..c057af5b9d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-email-token.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateEmailToken( + "<USER_ID>", + "email@example.com", + account.WithCreateEmailTokenPhrase(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..665f365e20 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateJWT( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..cad88c183d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateMagicURLToken( + "<USER_ID>", + "email@example.com", + account.WithCreateMagicURLTokenUrl("https://example.com"), + account.WithCreateMagicURLTokenPhrase(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..336a91d944 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateMfaAuthenticator( + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..4e17eb5ad9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateMfaChallenge( + "email", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..714d6106a0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..56a2acdbf1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateOAuth2Token( + "amazon", + account.WithCreateOAuth2TokenSuccess("https://example.com"), + account.WithCreateOAuth2TokenFailure("https://example.com"), + account.WithCreateOAuth2TokenScopes([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b6c2ec7db7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreatePhoneToken( + "<USER_ID>", + "+12065550100", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..699cdb222e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreatePhoneVerification( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-recovery.md b/docs/examples/1.8.x/server-go/examples/account/create-recovery.md new file mode 100644 index 0000000000..923d2819a6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-recovery.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateRecovery( + "email@example.com", + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-session.md b/docs/examples/1.8.x/server-go/examples/account/create-session.md new file mode 100644 index 0000000000..f5949241ff --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-verification.md b/docs/examples/1.8.x/server-go/examples/account/create-verification.md new file mode 100644 index 0000000000..b3c7fd8004 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-verification.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateVerification( + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create.md b/docs/examples/1.8.x/server-go/examples/account/create.md new file mode 100644 index 0000000000..dc4fdfe8f6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.Create( + "<USER_ID>", + "email@example.com", + "", + account.WithCreateName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-identity.md b/docs/examples/1.8.x/server-go/examples/account/delete-identity.md new file mode 100644 index 0000000000..2155249894 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-identity.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..6eb956bdec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteMfaAuthenticator( + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-session.md b/docs/examples/1.8.x/server-go/examples/account/delete-session.md new file mode 100644 index 0000000000..3a1a9514bb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md new file mode 100644 index 0000000000..718d149241 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteSessions( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..fd07fe36d9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.GetMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get-prefs.md b/docs/examples/1.8.x/server-go/examples/account/get-prefs.md new file mode 100644 index 0000000000..911b5786ce --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get-prefs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.GetPrefs( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get-session.md b/docs/examples/1.8.x/server-go/examples/account/get-session.md new file mode 100644 index 0000000000..dc42c3c12d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.GetSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get.md b/docs/examples/1.8.x/server-go/examples/account/get.md new file mode 100644 index 0000000000..80fe2da7c0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-identities.md b/docs/examples/1.8.x/server-go/examples/account/list-identities.md new file mode 100644 index 0000000000..3bfa0a7b60 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-identities.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListIdentities( + account.WithListIdentitiesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-logs.md b/docs/examples/1.8.x/server-go/examples/account/list-logs.md new file mode 100644 index 0000000000..67ee6de1c2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-logs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListLogs( + account.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..26fb516fed --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListMfaFactors( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-sessions.md b/docs/examples/1.8.x/server-go/examples/account/list-sessions.md new file mode 100644 index 0000000000..96b8c10d4c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListSessions( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-email.md b/docs/examples/1.8.x/server-go/examples/account/update-email.md new file mode 100644 index 0000000000..7467080416 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-email.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateEmail( + "email@example.com", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..139eea3afd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMFA( + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..4cda48878b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.UpdateMagicURLSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..ce4ebaffe7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMfaAuthenticator( + "totp", + "<OTP>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..d2bb0c92ec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMfaChallenge( + "<CHALLENGE_ID>", + "<OTP>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..9902b143f5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-name.md b/docs/examples/1.8.x/server-go/examples/account/update-name.md new file mode 100644 index 0000000000..972873a17a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-name.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateName( + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-password.md b/docs/examples/1.8.x/server-go/examples/account/update-password.md new file mode 100644 index 0000000000..aedcd0ccbc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-password.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePassword( + "", + account.WithUpdatePasswordOldPassword("password"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md new file mode 100644 index 0000000000..c937d9cd0d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.UpdatePhoneSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..462d98db9a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePhoneVerification( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone.md b/docs/examples/1.8.x/server-go/examples/account/update-phone.md new file mode 100644 index 0000000000..163ecedd22 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePhone( + "+12065550100", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-prefs.md b/docs/examples/1.8.x/server-go/examples/account/update-prefs.md new file mode 100644 index 0000000000..ed566ba519 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePrefs( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-recovery.md b/docs/examples/1.8.x/server-go/examples/account/update-recovery.md new file mode 100644 index 0000000000..0d7820bfb9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-recovery.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateRecovery( + "<USER_ID>", + "<SECRET>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-session.md b/docs/examples/1.8.x/server-go/examples/account/update-session.md new file mode 100644 index 0000000000..61029a7157 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-status.md b/docs/examples/1.8.x/server-go/examples/account/update-status.md new file mode 100644 index 0000000000..05f6449a72 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-status.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateStatus( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-verification.md b/docs/examples/1.8.x/server-go/examples/account/update-verification.md new file mode 100644 index 0000000000..1c781659e4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateVerification( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md new file mode 100644 index 0000000000..98f405d6dd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetBrowser( + "aa", + avatars.WithGetBrowserWidth(0), + avatars.WithGetBrowserHeight(0), + avatars.WithGetBrowserQuality(-1), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..efdfdbd5dc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetCreditCard( + "amex", + avatars.WithGetCreditCardWidth(0), + avatars.WithGetCreditCardHeight(0), + avatars.WithGetCreditCardQuality(-1), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..35ea339097 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetFavicon( + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md new file mode 100644 index 0000000000..3af30f3cc3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetFlag( + "af", + avatars.WithGetFlagWidth(0), + avatars.WithGetFlagHeight(0), + avatars.WithGetFlagQuality(-1), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-image.md b/docs/examples/1.8.x/server-go/examples/avatars/get-image.md new file mode 100644 index 0000000000..f4e0324c9d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-image.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetImage( + "https://example.com", + avatars.WithGetImageWidth(0), + avatars.WithGetImageHeight(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a7519012e2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetInitials( + avatars.WithGetInitialsName("<NAME>"), + avatars.WithGetInitialsWidth(0), + avatars.WithGetInitialsHeight(0), + avatars.WithGetInitialsBackground(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..edd84269e3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetQR( + "<TEXT>", + avatars.WithGetQRSize(1), + avatars.WithGetQRMargin(0), + avatars.WithGetQRDownload(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..43b7aff721 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateBooleanAttributeDefault(false), + databases.WithCreateBooleanAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-collection.md b/docs/examples/1.8.x/server-go/examples/databases/create-collection.md new file mode 100644 index 0000000000..f72c4b360d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-collection.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithCreateCollectionPermissions(interface{}{"read("any")"}), + databases.WithCreateCollectionDocumentSecurity(false), + databases.WithCreateCollectionEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..7d0de22c7d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateDatetimeAttributeDefault(""), + databases.WithCreateDatetimeAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-document.md b/docs/examples/1.8.x/server-go/examples/databases/create-document.md new file mode 100644 index 0000000000..8990beaa8d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-document.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := databases.New(client) + response, error := service.CreateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{}, + databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md new file mode 100644 index 0000000000..d85d0d5395 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..7fa28adfb0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateEmailAttributeDefault("email@example.com"), + databases.WithCreateEmailAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..4921e2120b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + databases.WithCreateEnumAttributeDefault("<DEFAULT>"), + databases.WithCreateEnumAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..b933bab5e5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateFloatAttributeMin(0), + databases.WithCreateFloatAttributeMax(0), + databases.WithCreateFloatAttributeDefault(0), + databases.WithCreateFloatAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-index.md b/docs/examples/1.8.x/server-go/examples/databases/create-index.md new file mode 100644 index 0000000000..0513490178 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + "key", + []interface{}{}, + databases.WithCreateIndexOrders([]interface{}{}), + databases.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..d84771dee7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIntegerAttributeMin(0), + databases.WithCreateIntegerAttributeMax(0), + databases.WithCreateIntegerAttributeDefault(0), + databases.WithCreateIntegerAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..136a7e96e8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIpAttributeDefault(""), + databases.WithCreateIpAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..7fa8c9fad9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<RELATED_COLLECTION_ID>", + "oneToOne", + databases.WithCreateRelationshipAttributeTwoWay(false), + databases.WithCreateRelationshipAttributeKey(""), + databases.WithCreateRelationshipAttributeTwoWayKey(""), + databases.WithCreateRelationshipAttributeOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..25d3c1066a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + 1, + false, + databases.WithCreateStringAttributeDefault("<DEFAULT>"), + databases.WithCreateStringAttributeArray(false), + databases.WithCreateStringAttributeEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..dd77c93207 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateUrlAttributeDefault("https://example.com"), + databases.WithCreateUrlAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create.md b/docs/examples/1.8.x/server-go/examples/databases/create.md new file mode 100644 index 0000000000..f51a5d70f3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Create( + "<DATABASE_ID>", + "<NAME>", + databases.WithCreateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..1d9c094030 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DecrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "", + databases.WithDecrementDocumentAttributeValue(0), + databases.WithDecrementDocumentAttributeMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..c34c83a6a5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md new file mode 100644 index 0000000000..01e7710c26 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-document.md b/docs/examples/1.8.x/server-go/examples/databases/delete-document.md new file mode 100644 index 0000000000..1fc4092ac6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-document.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.DeleteDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md new file mode 100644 index 0000000000..fe018b1bbf --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithDeleteDocumentsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-index.md b/docs/examples/1.8.x/server-go/examples/databases/delete-index.md new file mode 100644 index 0000000000..07bbb6f80c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete.md b/docs/examples/1.8.x/server-go/examples/databases/delete.md new file mode 100644 index 0000000000..60995b66f0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Delete( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md new file mode 100644 index 0000000000..560f34c018 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.GetAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-collection.md b/docs/examples/1.8.x/server-go/examples/databases/get-collection.md new file mode 100644 index 0000000000..75de4c6882 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-collection.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.GetCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-document.md b/docs/examples/1.8.x/server-go/examples/databases/get-document.md new file mode 100644 index 0000000000..8bdd26c351 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-document.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.GetDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithGetDocumentQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-index.md b/docs/examples/1.8.x/server-go/examples/databases/get-index.md new file mode 100644 index 0000000000..ef38678361 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get.md b/docs/examples/1.8.x/server-go/examples/databases/get.md new file mode 100644 index 0000000000..0d1eb87a29 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Get( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..fa63e9c8df --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.IncrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "", + databases.WithIncrementDocumentAttributeValue(0), + databases.WithIncrementDocumentAttributeMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e4748c6f90 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.ListAttributes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListAttributesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-collections.md b/docs/examples/1.8.x/server-go/examples/databases/list-collections.md new file mode 100644 index 0000000000..91716dc40e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-collections.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.ListCollections( + "<DATABASE_ID>", + databases.WithListCollectionsQueries([]interface{}{}), + databases.WithListCollectionsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-documents.md b/docs/examples/1.8.x/server-go/examples/databases/list-documents.md new file mode 100644 index 0000000000..91d0408efc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-documents.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.ListDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListDocumentsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md new file mode 100644 index 0000000000..a5af8d2847 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list.md b/docs/examples/1.8.x/server-go/examples/databases/list.md new file mode 100644 index 0000000000..f377c11df0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.List( + databases.WithListQueries([]interface{}{}), + databases.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..87e16a0e01 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + false, + databases.WithUpdateBooleanAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-collection.md b/docs/examples/1.8.x/server-go/examples/databases/update-collection.md new file mode 100644 index 0000000000..07077ff0c0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-collection.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}), + databases.WithUpdateCollectionDocumentSecurity(false), + databases.WithUpdateCollectionEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..24017ff8b4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateDatetimeAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-document.md b/docs/examples/1.8.x/server-go/examples/databases/update-document.md new file mode 100644 index 0000000000..b36c9694db --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-document.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.UpdateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithUpdateDocumentData(map[string]interface{}{}), + databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-documents.md b/docs/examples/1.8.x/server-go/examples/databases/update-documents.md new file mode 100644 index 0000000000..e1b2a95bc9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-documents.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithUpdateDocumentsData(map[string]interface{}{}), + databases.WithUpdateDocumentsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..e58ac912be --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "email@example.com", + databases.WithUpdateEmailAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..ea6ef4b5f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + databases.WithUpdateEnumAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..db0915a5e2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateFloatAttributeMin(0), + databases.WithUpdateFloatAttributeMax(0), + databases.WithUpdateFloatAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..ac956b61bc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateIntegerAttributeMin(0), + databases.WithUpdateIntegerAttributeMax(0), + databases.WithUpdateIntegerAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..faaefd7180 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateIpAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..db8057a728 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + databases.WithUpdateRelationshipAttributeOnDelete("cascade"), + databases.WithUpdateRelationshipAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..f9876a2305 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "<DEFAULT>", + databases.WithUpdateStringAttributeSize(1), + databases.WithUpdateStringAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..d97cf205ef --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "https://example.com", + databases.WithUpdateUrlAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update.md b/docs/examples/1.8.x/server-go/examples/databases/update.md new file mode 100644 index 0000000000..c7fd49fcec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Update( + "<DATABASE_ID>", + "<NAME>", + databases.WithUpdateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c5304b1860 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := databases.New(client) + response, error := service.UpsertDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..5fe0fc5831 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpsertDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md new file mode 100644 index 0000000000..53cdbf2038 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateDeployment( + "<FUNCTION_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + functions.WithCreateDeploymentEntrypoint("<ENTRYPOINT>"), + functions.WithCreateDeploymentCommands("<COMMANDS>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..367ebd723d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateDuplicateDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithCreateDuplicateDeploymentBuildId("<BUILD_ID>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md new file mode 100644 index 0000000000..33657d2503 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := functions.New(client) + response, error := service.CreateExecution( + "<FUNCTION_ID>", + functions.WithCreateExecutionBody("<BODY>"), + functions.WithCreateExecutionAsync(false), + functions.WithCreateExecutionPath("<PATH>"), + functions.WithCreateExecutionMethod("GET"), + functions.WithCreateExecutionHeaders(map[string]interface{}{}), + functions.WithCreateExecutionScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..87940ce5d4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateTemplateDeployment( + "<FUNCTION_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + functions.WithCreateTemplateDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-variable.md b/docs/examples/1.8.x/server-go/examples/functions/create-variable.md new file mode 100644 index 0000000000..68e4b7728e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-variable.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateVariable( + "<FUNCTION_ID>", + "<KEY>", + "<VALUE>", + functions.WithCreateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..76d98acd56 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateVcsDeployment( + "<FUNCTION_ID>", + "branch", + "<REFERENCE>", + functions.WithCreateVcsDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create.md b/docs/examples/1.8.x/server-go/examples/functions/create.md new file mode 100644 index 0000000000..63dc01c556 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Create( + "<FUNCTION_ID>", + "<NAME>", + "node-14.5", + functions.WithCreateExecute(interface{}{"any"}), + functions.WithCreateEvents([]interface{}{}), + functions.WithCreateSchedule(""), + functions.WithCreateTimeout(1), + functions.WithCreateEnabled(false), + functions.WithCreateLogging(false), + functions.WithCreateEntrypoint("<ENTRYPOINT>"), + functions.WithCreateCommands("<COMMANDS>"), + functions.WithCreateScopes([]interface{}{}), + functions.WithCreateInstallationId("<INSTALLATION_ID>"), + functions.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + functions.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + functions.WithCreateProviderSilentMode(false), + functions.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + functions.WithCreateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..1763878c91 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.DeleteDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md new file mode 100644 index 0000000000..045f24ff1d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.DeleteExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md new file mode 100644 index 0000000000..cbc3cdd57e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.DeleteVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete.md b/docs/examples/1.8.x/server-go/examples/functions/delete.md new file mode 100644 index 0000000000..87bddcc6f3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Delete( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..226537bc68 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.GetDeploymentDownload( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithGetDeploymentDownloadType("source"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md new file mode 100644 index 0000000000..d94d1a187a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.GetDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-execution.md b/docs/examples/1.8.x/server-go/examples/functions/get-execution.md new file mode 100644 index 0000000000..739af771ee --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-execution.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := functions.New(client) + response, error := service.GetExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-variable.md b/docs/examples/1.8.x/server-go/examples/functions/get-variable.md new file mode 100644 index 0000000000..f96c84ced3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.GetVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get.md b/docs/examples/1.8.x/server-go/examples/functions/get.md new file mode 100644 index 0000000000..bfa5333e41 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Get( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md new file mode 100644 index 0000000000..8d040ce546 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListDeployments( + "<FUNCTION_ID>", + functions.WithListDeploymentsQueries([]interface{}{}), + functions.WithListDeploymentsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-executions.md b/docs/examples/1.8.x/server-go/examples/functions/list-executions.md new file mode 100644 index 0000000000..aa7e551c90 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-executions.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := functions.New(client) + response, error := service.ListExecutions( + "<FUNCTION_ID>", + functions.WithListExecutionsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..4e251247d3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListRuntimes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md new file mode 100644 index 0000000000..9b554b1cde --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListSpecifications( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-variables.md b/docs/examples/1.8.x/server-go/examples/functions/list-variables.md new file mode 100644 index 0000000000..68df7f8aa2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-variables.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListVariables( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list.md b/docs/examples/1.8.x/server-go/examples/functions/list.md new file mode 100644 index 0000000000..bff9229c08 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.List( + functions.WithListQueries([]interface{}{}), + functions.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..75dce2fe74 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.UpdateDeploymentStatus( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..e8a1c8b2af --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.UpdateFunctionDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-variable.md b/docs/examples/1.8.x/server-go/examples/functions/update-variable.md new file mode 100644 index 0000000000..658540d027 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update-variable.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.UpdateVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + "<KEY>", + functions.WithUpdateVariableValue("<VALUE>"), + functions.WithUpdateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update.md b/docs/examples/1.8.x/server-go/examples/functions/update.md new file mode 100644 index 0000000000..7c2771efc8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Update( + "<FUNCTION_ID>", + "<NAME>", + functions.WithUpdateRuntime("node-14.5"), + functions.WithUpdateExecute(interface{}{"any"}), + functions.WithUpdateEvents([]interface{}{}), + functions.WithUpdateSchedule(""), + functions.WithUpdateTimeout(1), + functions.WithUpdateEnabled(false), + functions.WithUpdateLogging(false), + functions.WithUpdateEntrypoint("<ENTRYPOINT>"), + functions.WithUpdateCommands("<COMMANDS>"), + functions.WithUpdateScopes([]interface{}{}), + functions.WithUpdateInstallationId("<INSTALLATION_ID>"), + functions.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + functions.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + functions.WithUpdateProviderSilentMode(false), + functions.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + functions.WithUpdateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/graphql/mutation.md b/docs/examples/1.8.x/server-go/examples/graphql/mutation.md new file mode 100644 index 0000000000..12ac4aeae1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/graphql/mutation.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/graphql" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := graphql.New(client) + response, error := service.Mutation( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/graphql/query.md b/docs/examples/1.8.x/server-go/examples/graphql/query.md new file mode 100644 index 0000000000..ff67e5e30f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/graphql/query.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/graphql" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := graphql.New(client) + response, error := service.Query( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md new file mode 100644 index 0000000000..ee880a756c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetAntivirus( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-cache.md b/docs/examples/1.8.x/server-go/examples/health/get-cache.md new file mode 100644 index 0000000000..976a5b5a50 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-cache.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetCache( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-certificate.md b/docs/examples/1.8.x/server-go/examples/health/get-certificate.md new file mode 100644 index 0000000000..03cbbc190e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-certificate.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetCertificate( + health.WithGetCertificateDomain(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-d-b.md b/docs/examples/1.8.x/server-go/examples/health/get-d-b.md new file mode 100644 index 0000000000..2ab86d11c0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-d-b.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetDB( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..59d8baffca --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetFailedJobs( + "v1-database", + health.WithGetFailedJobsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..451c47c806 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetPubSub( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..e3a16fb1ae --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueBuilds( + health.WithGetQueueBuildsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..42505bfc25 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueCertificates( + health.WithGetQueueCertificatesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..1f1d3669fa --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueDatabases( + health.WithGetQueueDatabasesName("<NAME>"), + health.WithGetQueueDatabasesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..83c40caa4c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueDeletes( + health.WithGetQueueDeletesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..d79f07e313 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueFunctions( + health.WithGetQueueFunctionsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..b67123f8f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueLogs( + health.WithGetQueueLogsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..efbdfe48bb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueMails( + health.WithGetQueueMailsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..65c167fc18 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueMessaging( + health.WithGetQueueMessagingThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..8a009960b1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueMigrations( + health.WithGetQueueMigrationsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..ba3c71317a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueStatsResources( + health.WithGetQueueStatsResourcesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..cdc175887f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueUsage( + health.WithGetQueueUsageThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..06791aa229 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueWebhooks( + health.WithGetQueueWebhooksThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md new file mode 100644 index 0000000000..4e88e0a555 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetStorageLocal( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-storage.md b/docs/examples/1.8.x/server-go/examples/health/get-storage.md new file mode 100644 index 0000000000..3ec9ed8f6d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-storage.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetStorage( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-time.md b/docs/examples/1.8.x/server-go/examples/health/get-time.md new file mode 100644 index 0000000000..323746e93d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-time.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetTime( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get.md b/docs/examples/1.8.x/server-go/examples/health/get.md new file mode 100644 index 0000000000..50443c9430 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/get.md b/docs/examples/1.8.x/server-go/examples/locale/get.md new file mode 100644 index 0000000000..801df85bb4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-codes.md b/docs/examples/1.8.x/server-go/examples/locale/list-codes.md new file mode 100644 index 0000000000..6625746b8a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-continents.md b/docs/examples/1.8.x/server-go/examples/locale/list-continents.md new file mode 100644 index 0000000000..f6e05db3c5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-continents.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListContinents( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..9f85161f1e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCountriesEU( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..e7438be997 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCountriesPhones( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries.md new file mode 100644 index 0000000000..5f00e6bca5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCountries( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md new file mode 100644 index 0000000000..6971eb12ec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCurrencies( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-languages.md b/docs/examples/1.8.x/server-go/examples/locale/list-languages.md new file mode 100644 index 0000000000..23bb409a61 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-languages.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListLanguages( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..36a5b747ce --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateApnsProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateApnsProviderAuthKey("<AUTH_KEY>"), + messaging.WithCreateApnsProviderAuthKeyId("<AUTH_KEY_ID>"), + messaging.WithCreateApnsProviderTeamId("<TEAM_ID>"), + messaging.WithCreateApnsProviderBundleId("<BUNDLE_ID>"), + messaging.WithCreateApnsProviderSandbox(false), + messaging.WithCreateApnsProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-email.md b/docs/examples/1.8.x/server-go/examples/messaging/create-email.md new file mode 100644 index 0000000000..9915ae1398 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-email.md @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateEmail( + "<MESSAGE_ID>", + "<SUBJECT>", + "<CONTENT>", + messaging.WithCreateEmailTopics([]interface{}{}), + messaging.WithCreateEmailUsers([]interface{}{}), + messaging.WithCreateEmailTargets([]interface{}{}), + messaging.WithCreateEmailCc([]interface{}{}), + messaging.WithCreateEmailBcc([]interface{}{}), + messaging.WithCreateEmailAttachments([]interface{}{}), + messaging.WithCreateEmailDraft(false), + messaging.WithCreateEmailHtml(false), + messaging.WithCreateEmailScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..266b11ce5f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateFcmProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateFcmProviderServiceAccountJSON(map[string]interface{}{}), + messaging.WithCreateFcmProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..655cdbf4c3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateMailgunProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateMailgunProviderApiKey("<API_KEY>"), + messaging.WithCreateMailgunProviderDomain("<DOMAIN>"), + messaging.WithCreateMailgunProviderIsEuRegion(false), + messaging.WithCreateMailgunProviderFromName("<FROM_NAME>"), + messaging.WithCreateMailgunProviderFromEmail("email@example.com"), + messaging.WithCreateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateMailgunProviderReplyToEmail("email@example.com"), + messaging.WithCreateMailgunProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..85c17ff242 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateMsg91Provider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + messaging.WithCreateMsg91ProviderSenderId("<SENDER_ID>"), + messaging.WithCreateMsg91ProviderAuthKey("<AUTH_KEY>"), + messaging.WithCreateMsg91ProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-push.md b/docs/examples/1.8.x/server-go/examples/messaging/create-push.md new file mode 100644 index 0000000000..86bd58bab6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-push.md @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreatePush( + "<MESSAGE_ID>", + messaging.WithCreatePushTitle("<TITLE>"), + messaging.WithCreatePushBody("<BODY>"), + messaging.WithCreatePushTopics([]interface{}{}), + messaging.WithCreatePushUsers([]interface{}{}), + messaging.WithCreatePushTargets([]interface{}{}), + messaging.WithCreatePushData(map[string]interface{}{}), + messaging.WithCreatePushAction("<ACTION>"), + messaging.WithCreatePushImage("[ID1:ID2]"), + messaging.WithCreatePushIcon("<ICON>"), + messaging.WithCreatePushSound("<SOUND>"), + messaging.WithCreatePushColor("<COLOR>"), + messaging.WithCreatePushTag("<TAG>"), + messaging.WithCreatePushBadge(0), + messaging.WithCreatePushDraft(false), + messaging.WithCreatePushScheduledAt(""), + messaging.WithCreatePushContentAvailable(false), + messaging.WithCreatePushCritical(false), + messaging.WithCreatePushPriority("normal"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..5bc3bd3e9b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateSendgridProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateSendgridProviderApiKey("<API_KEY>"), + messaging.WithCreateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithCreateSendgridProviderFromEmail("email@example.com"), + messaging.WithCreateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSendgridProviderReplyToEmail("email@example.com"), + messaging.WithCreateSendgridProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md new file mode 100644 index 0000000000..0afa78f5f6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateSms( + "<MESSAGE_ID>", + "<CONTENT>", + messaging.WithCreateSmsTopics([]interface{}{}), + messaging.WithCreateSmsUsers([]interface{}{}), + messaging.WithCreateSmsTargets([]interface{}{}), + messaging.WithCreateSmsDraft(false), + messaging.WithCreateSmsScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..9d84f98a9f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateSmtpProvider( + "<PROVIDER_ID>", + "<NAME>", + "<HOST>", + messaging.WithCreateSmtpProviderPort(1), + messaging.WithCreateSmtpProviderUsername("<USERNAME>"), + messaging.WithCreateSmtpProviderPassword("<PASSWORD>"), + messaging.WithCreateSmtpProviderEncryption("none"), + messaging.WithCreateSmtpProviderAutoTLS(false), + messaging.WithCreateSmtpProviderMailer("<MAILER>"), + messaging.WithCreateSmtpProviderFromName("<FROM_NAME>"), + messaging.WithCreateSmtpProviderFromEmail("email@example.com"), + messaging.WithCreateSmtpProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSmtpProviderReplyToEmail("email@example.com"), + messaging.WithCreateSmtpProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..71a46d1cb2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := messaging.New(client) + response, error := service.CreateSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..e5afce8a43 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTelesignProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTelesignProviderFrom("+12065550100"), + messaging.WithCreateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithCreateTelesignProviderApiKey("<API_KEY>"), + messaging.WithCreateTelesignProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..8e36b21dd3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTextmagicProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTextmagicProviderFrom("+12065550100"), + messaging.WithCreateTextmagicProviderUsername("<USERNAME>"), + messaging.WithCreateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithCreateTextmagicProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md new file mode 100644 index 0000000000..9ded515cf2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTopic( + "<TOPIC_ID>", + "<NAME>", + messaging.WithCreateTopicSubscribe(interface{}{"any"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..1a5d4c79b3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTwilioProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTwilioProviderFrom("+12065550100"), + messaging.WithCreateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithCreateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithCreateTwilioProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..10d72a2a5b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateVonageProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateVonageProviderFrom("+12065550100"), + messaging.WithCreateVonageProviderApiKey("<API_KEY>"), + messaging.WithCreateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithCreateVonageProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..1b492df4a2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.DeleteProvider( + "<PROVIDER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..8bdbc6c26b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := messaging.New(client) + response, error := service.DeleteSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..4bfc03f504 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.DeleteTopic( + "<TOPIC_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete.md b/docs/examples/1.8.x/server-go/examples/messaging/delete.md new file mode 100644 index 0000000000..da0cc65cec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.Delete( + "<MESSAGE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-message.md b/docs/examples/1.8.x/server-go/examples/messaging/get-message.md new file mode 100644 index 0000000000..0273ce7373 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-message.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetMessage( + "<MESSAGE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md new file mode 100644 index 0000000000..f3736147ea --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetProvider( + "<PROVIDER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..da46b98e6e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md new file mode 100644 index 0000000000..005acefe3d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetTopic( + "<TOPIC_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..2af8b23fc8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListMessageLogs( + "<MESSAGE_ID>", + messaging.WithListMessageLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md new file mode 100644 index 0000000000..afc5646f02 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListMessages( + messaging.WithListMessagesQueries([]interface{}{}), + messaging.WithListMessagesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..665916c968 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListProviderLogs( + "<PROVIDER_ID>", + messaging.WithListProviderLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md new file mode 100644 index 0000000000..20c23231b2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListProviders( + messaging.WithListProvidersQueries([]interface{}{}), + messaging.WithListProvidersSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..b794781ad1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListSubscriberLogs( + "<SUBSCRIBER_ID>", + messaging.WithListSubscriberLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..98c63eb0b6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListSubscribers( + "<TOPIC_ID>", + messaging.WithListSubscribersQueries([]interface{}{}), + messaging.WithListSubscribersSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md new file mode 100644 index 0000000000..3df399eab3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListTargets( + "<MESSAGE_ID>", + messaging.WithListTargetsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..d972c202ed --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListTopicLogs( + "<TOPIC_ID>", + messaging.WithListTopicLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md new file mode 100644 index 0000000000..ca9dba1528 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListTopics( + messaging.WithListTopicsQueries([]interface{}{}), + messaging.WithListTopicsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..74e4fa56f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateApnsProvider( + "<PROVIDER_ID>", + messaging.WithUpdateApnsProviderName("<NAME>"), + messaging.WithUpdateApnsProviderEnabled(false), + messaging.WithUpdateApnsProviderAuthKey("<AUTH_KEY>"), + messaging.WithUpdateApnsProviderAuthKeyId("<AUTH_KEY_ID>"), + messaging.WithUpdateApnsProviderTeamId("<TEAM_ID>"), + messaging.WithUpdateApnsProviderBundleId("<BUNDLE_ID>"), + messaging.WithUpdateApnsProviderSandbox(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-email.md b/docs/examples/1.8.x/server-go/examples/messaging/update-email.md new file mode 100644 index 0000000000..7dd06e3ea2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-email.md @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateEmail( + "<MESSAGE_ID>", + messaging.WithUpdateEmailTopics([]interface{}{}), + messaging.WithUpdateEmailUsers([]interface{}{}), + messaging.WithUpdateEmailTargets([]interface{}{}), + messaging.WithUpdateEmailSubject("<SUBJECT>"), + messaging.WithUpdateEmailContent("<CONTENT>"), + messaging.WithUpdateEmailDraft(false), + messaging.WithUpdateEmailHtml(false), + messaging.WithUpdateEmailCc([]interface{}{}), + messaging.WithUpdateEmailBcc([]interface{}{}), + messaging.WithUpdateEmailScheduledAt(""), + messaging.WithUpdateEmailAttachments([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..c70327a022 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateFcmProvider( + "<PROVIDER_ID>", + messaging.WithUpdateFcmProviderName("<NAME>"), + messaging.WithUpdateFcmProviderEnabled(false), + messaging.WithUpdateFcmProviderServiceAccountJSON(map[string]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..80f078b056 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateMailgunProvider( + "<PROVIDER_ID>", + messaging.WithUpdateMailgunProviderName("<NAME>"), + messaging.WithUpdateMailgunProviderApiKey("<API_KEY>"), + messaging.WithUpdateMailgunProviderDomain("<DOMAIN>"), + messaging.WithUpdateMailgunProviderIsEuRegion(false), + messaging.WithUpdateMailgunProviderEnabled(false), + messaging.WithUpdateMailgunProviderFromName("<FROM_NAME>"), + messaging.WithUpdateMailgunProviderFromEmail("email@example.com"), + messaging.WithUpdateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateMailgunProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..70dbad455b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateMsg91Provider( + "<PROVIDER_ID>", + messaging.WithUpdateMsg91ProviderName("<NAME>"), + messaging.WithUpdateMsg91ProviderEnabled(false), + messaging.WithUpdateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + messaging.WithUpdateMsg91ProviderSenderId("<SENDER_ID>"), + messaging.WithUpdateMsg91ProviderAuthKey("<AUTH_KEY>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-push.md b/docs/examples/1.8.x/server-go/examples/messaging/update-push.md new file mode 100644 index 0000000000..e68bd77311 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-push.md @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdatePush( + "<MESSAGE_ID>", + messaging.WithUpdatePushTopics([]interface{}{}), + messaging.WithUpdatePushUsers([]interface{}{}), + messaging.WithUpdatePushTargets([]interface{}{}), + messaging.WithUpdatePushTitle("<TITLE>"), + messaging.WithUpdatePushBody("<BODY>"), + messaging.WithUpdatePushData(map[string]interface{}{}), + messaging.WithUpdatePushAction("<ACTION>"), + messaging.WithUpdatePushImage("[ID1:ID2]"), + messaging.WithUpdatePushIcon("<ICON>"), + messaging.WithUpdatePushSound("<SOUND>"), + messaging.WithUpdatePushColor("<COLOR>"), + messaging.WithUpdatePushTag("<TAG>"), + messaging.WithUpdatePushBadge(0), + messaging.WithUpdatePushDraft(false), + messaging.WithUpdatePushScheduledAt(""), + messaging.WithUpdatePushContentAvailable(false), + messaging.WithUpdatePushCritical(false), + messaging.WithUpdatePushPriority("normal"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..9c442e26e5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateSendgridProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSendgridProviderName("<NAME>"), + messaging.WithUpdateSendgridProviderEnabled(false), + messaging.WithUpdateSendgridProviderApiKey("<API_KEY>"), + messaging.WithUpdateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSendgridProviderFromEmail("email@example.com"), + messaging.WithUpdateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSendgridProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md new file mode 100644 index 0000000000..f62798e298 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateSms( + "<MESSAGE_ID>", + messaging.WithUpdateSmsTopics([]interface{}{}), + messaging.WithUpdateSmsUsers([]interface{}{}), + messaging.WithUpdateSmsTargets([]interface{}{}), + messaging.WithUpdateSmsContent("<CONTENT>"), + messaging.WithUpdateSmsDraft(false), + messaging.WithUpdateSmsScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..ccfb91b1b9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateSmtpProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSmtpProviderName("<NAME>"), + messaging.WithUpdateSmtpProviderHost("<HOST>"), + messaging.WithUpdateSmtpProviderPort(1), + messaging.WithUpdateSmtpProviderUsername("<USERNAME>"), + messaging.WithUpdateSmtpProviderPassword("<PASSWORD>"), + messaging.WithUpdateSmtpProviderEncryption("none"), + messaging.WithUpdateSmtpProviderAutoTLS(false), + messaging.WithUpdateSmtpProviderMailer("<MAILER>"), + messaging.WithUpdateSmtpProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSmtpProviderFromEmail("email@example.com"), + messaging.WithUpdateSmtpProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSmtpProviderReplyToEmail("<REPLY_TO_EMAIL>"), + messaging.WithUpdateSmtpProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..77549380c8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTelesignProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTelesignProviderName("<NAME>"), + messaging.WithUpdateTelesignProviderEnabled(false), + messaging.WithUpdateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithUpdateTelesignProviderApiKey("<API_KEY>"), + messaging.WithUpdateTelesignProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..55350f7a1e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTextmagicProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTextmagicProviderName("<NAME>"), + messaging.WithUpdateTextmagicProviderEnabled(false), + messaging.WithUpdateTextmagicProviderUsername("<USERNAME>"), + messaging.WithUpdateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithUpdateTextmagicProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md new file mode 100644 index 0000000000..a83b5e4852 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTopic( + "<TOPIC_ID>", + messaging.WithUpdateTopicName("<NAME>"), + messaging.WithUpdateTopicSubscribe(interface{}{"any"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..61b95dabf1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTwilioProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTwilioProviderName("<NAME>"), + messaging.WithUpdateTwilioProviderEnabled(false), + messaging.WithUpdateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithUpdateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithUpdateTwilioProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..4cfc03c2b5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateVonageProvider( + "<PROVIDER_ID>", + messaging.WithUpdateVonageProviderName("<NAME>"), + messaging.WithUpdateVonageProviderEnabled(false), + messaging.WithUpdateVonageProviderApiKey("<API_KEY>"), + messaging.WithUpdateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithUpdateVonageProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md new file mode 100644 index 0000000000..5a13b3e152 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateDeployment( + "<SITE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + sites.WithCreateDeploymentInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateDeploymentBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateDeploymentOutputDirectory("<OUTPUT_DIRECTORY>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..84b4932b36 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateDuplicateDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..b67f65f6c9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateTemplateDeployment( + "<SITE_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + sites.WithCreateTemplateDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-variable.md b/docs/examples/1.8.x/server-go/examples/sites/create-variable.md new file mode 100644 index 0000000000..05148190e9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-variable.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateVariable( + "<SITE_ID>", + "<KEY>", + "<VALUE>", + sites.WithCreateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..c13edc5900 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateVcsDeployment( + "<SITE_ID>", + "branch", + "<REFERENCE>", + sites.WithCreateVcsDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create.md b/docs/examples/1.8.x/server-go/examples/sites/create.md new file mode 100644 index 0000000000..f87a3068a2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Create( + "<SITE_ID>", + "<NAME>", + "analog", + "node-14.5", + sites.WithCreateEnabled(false), + sites.WithCreateLogging(false), + sites.WithCreateTimeout(1), + sites.WithCreateInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithCreateAdapter("static"), + sites.WithCreateInstallationId("<INSTALLATION_ID>"), + sites.WithCreateFallbackFile("<FALLBACK_FILE>"), + sites.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithCreateProviderSilentMode(false), + sites.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithCreateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..5e5de1a888 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.DeleteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-log.md b/docs/examples/1.8.x/server-go/examples/sites/delete-log.md new file mode 100644 index 0000000000..fe3add16fe --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-log.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.DeleteLog( + "<SITE_ID>", + "<LOG_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md new file mode 100644 index 0000000000..389d454c4c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.DeleteVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete.md b/docs/examples/1.8.x/server-go/examples/sites/delete.md new file mode 100644 index 0000000000..184276dc4b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Delete( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..a90d358073 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetDeploymentDownload( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + sites.WithGetDeploymentDownloadType("source"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md new file mode 100644 index 0000000000..17d066e8fe --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-log.md b/docs/examples/1.8.x/server-go/examples/sites/get-log.md new file mode 100644 index 0000000000..ca0031546d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-log.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetLog( + "<SITE_ID>", + "<LOG_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-variable.md b/docs/examples/1.8.x/server-go/examples/sites/get-variable.md new file mode 100644 index 0000000000..55f8ddf6ca --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get.md b/docs/examples/1.8.x/server-go/examples/sites/get.md new file mode 100644 index 0000000000..e876766da8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Get( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md new file mode 100644 index 0000000000..b6ab37ea79 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListDeployments( + "<SITE_ID>", + sites.WithListDeploymentsQueries([]interface{}{}), + sites.WithListDeploymentsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..dae9a1814d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListFrameworks( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-logs.md b/docs/examples/1.8.x/server-go/examples/sites/list-logs.md new file mode 100644 index 0000000000..1c756cdbb6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListLogs( + "<SITE_ID>", + sites.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md new file mode 100644 index 0000000000..96d74c7fc3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListSpecifications( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-variables.md b/docs/examples/1.8.x/server-go/examples/sites/list-variables.md new file mode 100644 index 0000000000..c6d329736d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-variables.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListVariables( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list.md b/docs/examples/1.8.x/server-go/examples/sites/list.md new file mode 100644 index 0000000000..e43442226a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.List( + sites.WithListQueries([]interface{}{}), + sites.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..3c8cd3201d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.UpdateDeploymentStatus( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..806fbb35a6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.UpdateSiteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-variable.md b/docs/examples/1.8.x/server-go/examples/sites/update-variable.md new file mode 100644 index 0000000000..c2f0506b44 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update-variable.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.UpdateVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + "<KEY>", + sites.WithUpdateVariableValue("<VALUE>"), + sites.WithUpdateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update.md b/docs/examples/1.8.x/server-go/examples/sites/update.md new file mode 100644 index 0000000000..3dd53e283a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Update( + "<SITE_ID>", + "<NAME>", + "analog", + sites.WithUpdateEnabled(false), + sites.WithUpdateLogging(false), + sites.WithUpdateTimeout(1), + sites.WithUpdateInstallCommand("<INSTALL_COMMAND>"), + sites.WithUpdateBuildCommand("<BUILD_COMMAND>"), + sites.WithUpdateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithUpdateBuildRuntime("node-14.5"), + sites.WithUpdateAdapter("static"), + sites.WithUpdateFallbackFile("<FALLBACK_FILE>"), + sites.WithUpdateInstallationId("<INSTALLATION_ID>"), + sites.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithUpdateProviderSilentMode(false), + sites.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithUpdateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a2679d9894 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.CreateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithCreateBucketPermissions(interface{}{"read("any")"}), + storage.WithCreateBucketFileSecurity(false), + storage.WithCreateBucketEnabled(false), + storage.WithCreateBucketMaximumFileSize(1), + storage.WithCreateBucketAllowedFileExtensions([]interface{}{}), + storage.WithCreateBucketCompression("none"), + storage.WithCreateBucketEncryption(false), + storage.WithCreateBucketAntivirus(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/create-file.md b/docs/examples/1.8.x/server-go/examples/storage/create-file.md new file mode 100644 index 0000000000..4d87231490 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/create-file.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.CreateFile( + "<BUCKET_ID>", + "<FILE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + storage.WithCreateFilePermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..28832a1187 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.DeleteBucket( + "<BUCKET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/delete-file.md b/docs/examples/1.8.x/server-go/examples/storage/delete-file.md new file mode 100644 index 0000000000..e616054107 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/delete-file.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.DeleteFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md new file mode 100644 index 0000000000..acb722546e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.GetBucket( + "<BUCKET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md new file mode 100644 index 0000000000..c0a1724eac --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFileDownload( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileDownloadToken("<TOKEN>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..5d7d75a4f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFilePreview( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFilePreviewWidth(0), + storage.WithGetFilePreviewHeight(0), + storage.WithGetFilePreviewGravity("center"), + storage.WithGetFilePreviewQuality(-1), + storage.WithGetFilePreviewBorderWidth(0), + storage.WithGetFilePreviewBorderColor(""), + storage.WithGetFilePreviewBorderRadius(0), + storage.WithGetFilePreviewOpacity(0), + storage.WithGetFilePreviewRotation(-360), + storage.WithGetFilePreviewBackground(""), + storage.WithGetFilePreviewOutput("jpg"), + storage.WithGetFilePreviewToken("<TOKEN>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md new file mode 100644 index 0000000000..ca59105821 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFileView( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileViewToken("<TOKEN>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file.md b/docs/examples/1.8.x/server-go/examples/storage/get-file.md new file mode 100644 index 0000000000..b33170e93c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md new file mode 100644 index 0000000000..79f4c4b3e4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.ListBuckets( + storage.WithListBucketsQueries([]interface{}{}), + storage.WithListBucketsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/list-files.md b/docs/examples/1.8.x/server-go/examples/storage/list-files.md new file mode 100644 index 0000000000..2c2652a97e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/list-files.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.ListFiles( + "<BUCKET_ID>", + storage.WithListFilesQueries([]interface{}{}), + storage.WithListFilesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md new file mode 100644 index 0000000000..ac28e5b649 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.UpdateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithUpdateBucketPermissions(interface{}{"read("any")"}), + storage.WithUpdateBucketFileSecurity(false), + storage.WithUpdateBucketEnabled(false), + storage.WithUpdateBucketMaximumFileSize(1), + storage.WithUpdateBucketAllowedFileExtensions([]interface{}{}), + storage.WithUpdateBucketCompression("none"), + storage.WithUpdateBucketEncryption(false), + storage.WithUpdateBucketAntivirus(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/update-file.md b/docs/examples/1.8.x/server-go/examples/storage/update-file.md new file mode 100644 index 0000000000..d6887a82c1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/update-file.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.UpdateFile( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithUpdateFileName("<NAME>"), + storage.WithUpdateFilePermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..70a666257f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateBooleanColumnDefault(false), + tables.WithCreateBooleanColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..beb8bd09e6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateDatetimeColumnDefault(""), + tables.WithCreateDatetimeColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md new file mode 100644 index 0000000000..449cc0e88a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateEmailColumnDefault("email@example.com"), + tables.WithCreateEmailColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..8f3bb84bb7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + tables.WithCreateEnumColumnDefault("<DEFAULT>"), + tables.WithCreateEnumColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md new file mode 100644 index 0000000000..eeabd851b9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateFloatColumnMin(0), + tables.WithCreateFloatColumnMax(0), + tables.WithCreateFloatColumnDefault(0), + tables.WithCreateFloatColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-index.md b/docs/examples/1.8.x/server-go/examples/tables/create-index.md new file mode 100644 index 0000000000..1737b29f6f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + tables.WithCreateIndexOrders([]interface{}{}), + tables.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..45a81f6415 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateIntegerColumnMin(0), + tables.WithCreateIntegerColumnMax(0), + tables.WithCreateIntegerColumnDefault(0), + tables.WithCreateIntegerColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..f6d203d65e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateIpColumnDefault(""), + tables.WithCreateIpColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..e2e6de59de --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + tables.WithCreateRelationshipColumnTwoWay(false), + tables.WithCreateRelationshipColumnKey(""), + tables.WithCreateRelationshipColumnTwoWayKey(""), + tables.WithCreateRelationshipColumnOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-row.md b/docs/examples/1.8.x/server-go/examples/tables/create-row.md new file mode 100644 index 0000000000..329f2a1c9c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-row.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := tables.New(client) + response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + tables.WithCreateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-rows.md b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md new file mode 100644 index 0000000000..7d32206bea --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md new file mode 100644 index 0000000000..afb41e2728 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + tables.WithCreateStringColumnDefault("<DEFAULT>"), + tables.WithCreateStringColumnArray(false), + tables.WithCreateStringColumnEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md new file mode 100644 index 0000000000..c4e30e30cd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateUrlColumnDefault("https://example.com"), + tables.WithCreateUrlColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create.md b/docs/examples/1.8.x/server-go/examples/tables/create.md new file mode 100644 index 0000000000..672824daa6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Create( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tables.WithCreatePermissions(interface{}{"read("any")"}), + tables.WithCreateRowSecurity(false), + tables.WithCreateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..8ef1d26a59 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tables.WithDecrementRowColumnValue(0), + tables.WithDecrementRowColumnMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-column.md b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md new file mode 100644 index 0000000000..f66fc199c3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-index.md b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md new file mode 100644 index 0000000000..1dddeef4e8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-row.md b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md new file mode 100644 index 0000000000..9f55934e41 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md new file mode 100644 index 0000000000..3ad38f8067 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithDeleteRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete.md b/docs/examples/1.8.x/server-go/examples/tables/delete.md new file mode 100644 index 0000000000..9637acc51d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Delete( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-column.md b/docs/examples/1.8.x/server-go/examples/tables/get-column.md new file mode 100644 index 0000000000..292d22800e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-index.md b/docs/examples/1.8.x/server-go/examples/tables/get-index.md new file mode 100644 index 0000000000..077e823195 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-row.md b/docs/examples/1.8.x/server-go/examples/tables/get-row.md new file mode 100644 index 0000000000..a224c60d98 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tables.WithGetRowQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get.md b/docs/examples/1.8.x/server-go/examples/tables/get.md new file mode 100644 index 0000000000..60304a8fd0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Get( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..5d8b2f5578 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tables.WithIncrementRowColumnValue(0), + tables.WithIncrementRowColumnMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-columns.md b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md new file mode 100644 index 0000000000..25712ef2a7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListColumnsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0be8e81164 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-rows.md b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md new file mode 100644 index 0000000000..aadbcf1dad --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list.md b/docs/examples/1.8.x/server-go/examples/tables/list.md new file mode 100644 index 0000000000..1942b7a2d2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.List( + "<DATABASE_ID>", + tables.WithListQueries([]interface{}{}), + tables.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..c76c3bb1cc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + tables.WithUpdateBooleanColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..e093904ad5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tables.WithUpdateDatetimeColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md new file mode 100644 index 0000000000..08845b5149 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + tables.WithUpdateEmailColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..e639f850ba --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + tables.WithUpdateEnumColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md new file mode 100644 index 0000000000..83fa3777c2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tables.WithUpdateFloatColumnMin(0), + tables.WithUpdateFloatColumnMax(0), + tables.WithUpdateFloatColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..5bbea02709 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tables.WithUpdateIntegerColumnMin(0), + tables.WithUpdateIntegerColumnMax(0), + tables.WithUpdateIntegerColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..f67711aaed --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tables.WithUpdateIpColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..1ec20edbb6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + tables.WithUpdateRelationshipColumnOnDelete("cascade"), + tables.WithUpdateRelationshipColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-row.md b/docs/examples/1.8.x/server-go/examples/tables/update-row.md new file mode 100644 index 0000000000..8ef1189769 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tables.WithUpdateRowData(map[string]interface{}{}), + tables.WithUpdateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-rows.md b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md new file mode 100644 index 0000000000..7579e32851 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithUpdateRowsData(map[string]interface{}{}), + tables.WithUpdateRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md new file mode 100644 index 0000000000..0a21b05e19 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + tables.WithUpdateStringColumnSize(1), + tables.WithUpdateStringColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md new file mode 100644 index 0000000000..aeb0541648 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + tables.WithUpdateUrlColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update.md b/docs/examples/1.8.x/server-go/examples/tables/update.md new file mode 100644 index 0000000000..7a75c10713 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Update( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tables.WithUpdatePermissions(interface{}{"read("any")"}), + tables.WithUpdateRowSecurity(false), + tables.WithUpdateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md new file mode 100644 index 0000000000..9bc9f00f8b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := tables.New(client) + response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..bc5a4db007 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/create-membership.md b/docs/examples/1.8.x/server-go/examples/teams/create-membership.md new file mode 100644 index 0000000000..e6cfb8b9c8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/create-membership.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.CreateMembership( + "<TEAM_ID>", + []interface{}{}, + teams.WithCreateMembershipEmail("email@example.com"), + teams.WithCreateMembershipUserId("<USER_ID>"), + teams.WithCreateMembershipPhone("+12065550100"), + teams.WithCreateMembershipUrl("https://example.com"), + teams.WithCreateMembershipName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/create.md b/docs/examples/1.8.x/server-go/examples/teams/create.md new file mode 100644 index 0000000000..773da7afcd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.Create( + "<TEAM_ID>", + "<NAME>", + teams.WithCreateRoles([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5ffee885fb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.DeleteMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/delete.md b/docs/examples/1.8.x/server-go/examples/teams/delete.md new file mode 100644 index 0000000000..c66c7056bd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.Delete( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/get-membership.md b/docs/examples/1.8.x/server-go/examples/teams/get-membership.md new file mode 100644 index 0000000000..466ab72059 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/get-membership.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.GetMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md new file mode 100644 index 0000000000..d8400e420a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.GetPrefs( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/get.md b/docs/examples/1.8.x/server-go/examples/teams/get.md new file mode 100644 index 0000000000..0f503c7f5b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.Get( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md new file mode 100644 index 0000000000..90b2babcb0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.ListMemberships( + "<TEAM_ID>", + teams.WithListMembershipsQueries([]interface{}{}), + teams.WithListMembershipsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/list.md b/docs/examples/1.8.x/server-go/examples/teams/list.md new file mode 100644 index 0000000000..e70ca11587 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.List( + teams.WithListQueries([]interface{}{}), + teams.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c9e1215971 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdateMembershipStatus( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-membership.md b/docs/examples/1.8.x/server-go/examples/teams/update-membership.md new file mode 100644 index 0000000000..8721a5ed6d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-membership.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdateMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-name.md b/docs/examples/1.8.x/server-go/examples/teams/update-name.md new file mode 100644 index 0000000000..0d75a7bb32 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-name.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdateName( + "<TEAM_ID>", + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e9631d5bf3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdatePrefs( + "<TEAM_ID>", + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..3109062d9e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.CreateFileToken( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithCreateFileTokenExpire(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/delete.md b/docs/examples/1.8.x/server-go/examples/tokens/delete.md new file mode 100644 index 0000000000..a376bab09b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.Delete( + "<TOKEN_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/get.md b/docs/examples/1.8.x/server-go/examples/tokens/get.md new file mode 100644 index 0000000000..4c01f68669 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.Get( + "<TOKEN_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/list.md b/docs/examples/1.8.x/server-go/examples/tokens/list.md new file mode 100644 index 0000000000..99876af081 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/list.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.List( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithListQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/update.md b/docs/examples/1.8.x/server-go/examples/tokens/update.md new file mode 100644 index 0000000000..eaba8eaafb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/update.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.Update( + "<TOKEN_ID>", + tokens.WithUpdateExpire(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-go/examples/users/create-argon2user.md new file mode 100644 index 0000000000..28565ff01c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-argon2user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateArgon2User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateArgon2UserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..fedf00327e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateBcryptUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateBcryptUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..c335ab4ea1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateJWT( + "<USER_ID>", + users.WithCreateJWTSessionId("<SESSION_ID>"), + users.WithCreateJWTDuration(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..369aab7ac7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateMD5User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateMD5UserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..1c2097e571 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..2a09bec811 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreatePHPassUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreatePHPassUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..2bc05f91f9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateSHAUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateSHAUserPasswordVersion("sha1"), + users.WithCreateSHAUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..f815121290 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateScryptModifiedUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + "<PASSWORD_SALT_SEPARATOR>", + "<PASSWORD_SIGNER_KEY>", + users.WithCreateScryptModifiedUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..f2fde655d2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateScryptUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + 0, + 0, + 0, + 0, + users.WithCreateScryptUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-session.md b/docs/examples/1.8.x/server-go/examples/users/create-session.md new file mode 100644 index 0000000000..b868319613 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateSession( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-target.md b/docs/examples/1.8.x/server-go/examples/users/create-target.md new file mode 100644 index 0000000000..71c449c603 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-target.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateTarget( + "<USER_ID>", + "<TARGET_ID>", + "email", + "<IDENTIFIER>", + users.WithCreateTargetProviderId("<PROVIDER_ID>"), + users.WithCreateTargetName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-token.md b/docs/examples/1.8.x/server-go/examples/users/create-token.md new file mode 100644 index 0000000000..d50c7efc28 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateToken( + "<USER_ID>", + users.WithCreateTokenLength(4), + users.WithCreateTokenExpire(60), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create.md b/docs/examples/1.8.x/server-go/examples/users/create.md new file mode 100644 index 0000000000..7cd8920bb2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.Create( + "<USER_ID>", + users.WithCreateEmail("email@example.com"), + users.WithCreatePhone("+12065550100"), + users.WithCreatePassword(""), + users.WithCreateName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-identity.md b/docs/examples/1.8.x/server-go/examples/users/delete-identity.md new file mode 100644 index 0000000000..f35a7917cc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-identity.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..bb845b90c1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteMfaAuthenticator( + "<USER_ID>", + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-session.md b/docs/examples/1.8.x/server-go/examples/users/delete-session.md new file mode 100644 index 0000000000..62f4bd5a89 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-session.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteSession( + "<USER_ID>", + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md new file mode 100644 index 0000000000..235b2b1e9e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteSessions( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-target.md b/docs/examples/1.8.x/server-go/examples/users/delete-target.md new file mode 100644 index 0000000000..ce942a9ead --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-target.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete.md b/docs/examples/1.8.x/server-go/examples/users/delete.md new file mode 100644 index 0000000000..1654957c95 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.Delete( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..8b16231be7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.GetMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get-prefs.md b/docs/examples/1.8.x/server-go/examples/users/get-prefs.md new file mode 100644 index 0000000000..4d3298fab8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.GetPrefs( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get-target.md b/docs/examples/1.8.x/server-go/examples/users/get-target.md new file mode 100644 index 0000000000..481052d75d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get-target.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.GetTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get.md b/docs/examples/1.8.x/server-go/examples/users/get.md new file mode 100644 index 0000000000..a4da4b741d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.Get( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-identities.md b/docs/examples/1.8.x/server-go/examples/users/list-identities.md new file mode 100644 index 0000000000..a9916f5fa3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-identities.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListIdentities( + users.WithListIdentitiesQueries([]interface{}{}), + users.WithListIdentitiesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-logs.md b/docs/examples/1.8.x/server-go/examples/users/list-logs.md new file mode 100644 index 0000000000..bb36dc531c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListLogs( + "<USER_ID>", + users.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-memberships.md b/docs/examples/1.8.x/server-go/examples/users/list-memberships.md new file mode 100644 index 0000000000..1591603971 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-memberships.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListMemberships( + "<USER_ID>", + users.WithListMembershipsQueries([]interface{}{}), + users.WithListMembershipsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..8709b21ae7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListMfaFactors( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-sessions.md b/docs/examples/1.8.x/server-go/examples/users/list-sessions.md new file mode 100644 index 0000000000..be4202400c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-sessions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListSessions( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-targets.md b/docs/examples/1.8.x/server-go/examples/users/list-targets.md new file mode 100644 index 0000000000..ed78ade5a8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-targets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListTargets( + "<USER_ID>", + users.WithListTargetsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list.md b/docs/examples/1.8.x/server-go/examples/users/list.md new file mode 100644 index 0000000000..c74a59a7e2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.List( + users.WithListQueries([]interface{}{}), + users.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md new file mode 100644 index 0000000000..411cd831c5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateEmailVerification( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-email.md b/docs/examples/1.8.x/server-go/examples/users/update-email.md new file mode 100644 index 0000000000..1e01350731 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-email.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateEmail( + "<USER_ID>", + "email@example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-labels.md b/docs/examples/1.8.x/server-go/examples/users/update-labels.md new file mode 100644 index 0000000000..0b735cdef5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-labels.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateLabels( + "<USER_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..d495b752de --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-mfa.md b/docs/examples/1.8.x/server-go/examples/users/update-mfa.md new file mode 100644 index 0000000000..cfcddbf5e1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-mfa.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateMfa( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-name.md b/docs/examples/1.8.x/server-go/examples/users/update-name.md new file mode 100644 index 0000000000..da9f3d5ac7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-name.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateName( + "<USER_ID>", + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-password.md b/docs/examples/1.8.x/server-go/examples/users/update-password.md new file mode 100644 index 0000000000..d09f5bb92c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-password.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePassword( + "<USER_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..fdf01898ea --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePhoneVerification( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-phone.md b/docs/examples/1.8.x/server-go/examples/users/update-phone.md new file mode 100644 index 0000000000..f4f5b5d01d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-phone.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePhone( + "<USER_ID>", + "+12065550100", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-prefs.md b/docs/examples/1.8.x/server-go/examples/users/update-prefs.md new file mode 100644 index 0000000000..75cb55b868 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-prefs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePrefs( + "<USER_ID>", + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-status.md b/docs/examples/1.8.x/server-go/examples/users/update-status.md new file mode 100644 index 0000000000..964ed3bf92 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateStatus( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-target.md b/docs/examples/1.8.x/server-go/examples/users/update-target.md new file mode 100644 index 0000000000..2c1ab3b71e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-target.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateTarget( + "<USER_ID>", + "<TARGET_ID>", + users.WithUpdateTargetIdentifier("<IDENTIFIER>"), + users.WithUpdateTargetProviderId("<PROVIDER_ID>"), + users.WithUpdateTargetName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..92c12acee5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,33 @@ +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-graphql/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..931bb4add0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-email-token.md b/docs/examples/1.8.x/server-graphql/examples/account/create-email-token.md new file mode 100644 index 0000000000..de320b45ed --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +mutation { + accountCreateEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a5204f1256 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md @@ -0,0 +1,5 @@ +mutation { + accountCreateJWT { + jwt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..4024a5b3a9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +mutation { + accountCreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..6b29292494 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + accountCreateMfaAuthenticator( + type: "totp" + ) { + secret + uri + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..eb5cba127d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,10 @@ +mutation { + accountCreateMfaChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f39b7d080d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountCreateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b56c4eb4e4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +mutation { + accountCreatePhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a4cad59b1a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-recovery.md b/docs/examples/1.8.x/server-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..ad31fd82d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-session.md b/docs/examples/1.8.x/server-graphql/examples/account/create-session.md new file mode 100644 index 0000000000..f473d14207 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..df50dda529 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-verification.md @@ -0,0 +1,12 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create.md b/docs/examples/1.8.x/server-graphql/examples/account/create.md new file mode 100644 index 0000000000..0d39394a3d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create.md @@ -0,0 +1,40 @@ +mutation { + accountCreate( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-identity.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..f3c2e2e7b9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..fc5486623a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteMfaAuthenticator( + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-session.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..09aff38fdd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "<SESSION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get-prefs.md b/docs/examples/1.8.x/server-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get-session.md b/docs/examples/1.8.x/server-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get.md b/docs/examples/1.8.x/server-graphql/examples/account/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-identities.md b/docs/examples/1.8.x/server-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-logs.md b/docs/examples/1.8.x/server-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-sessions.md b/docs/examples/1.8.x/server-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-email.md b/docs/examples/1.8.x/server-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..c879e24a43 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-email.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..787c2e0860 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..075bc91d17 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9cfe9150be --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateMfaAuthenticator( + type: "totp", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..0bcec2157f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e706d2b9d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountUpdateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-name.md b/docs/examples/1.8.x/server-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..8ba2c99d9c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-name.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateName( + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-password.md b/docs/examples/1.8.x/server-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..f3619a10d2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-password.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePassword( + password: "", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-session.md new file mode 100644 index 0000000000..199e774ab0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..dd62298bb9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-phone.md b/docs/examples/1.8.x/server-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..adecb71168 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-phone.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-prefs.md b/docs/examples/1.8.x/server-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..57280247e4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-prefs.md @@ -0,0 +1,37 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-recovery.md b/docs/examples/1.8.x/server-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..2d15fdcaa1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-session.md b/docs/examples/1.8.x/server-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..29a8979872 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-session.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateSession( + sessionId: "<SESSION_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-status.md b/docs/examples/1.8.x/server-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..c17f556842 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-status.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..11e63c7da3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-image.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..aa0bfa832e --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +mutation { + databasesCreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md new file mode 100644 index 0000000000..00dfba1e7b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md @@ -0,0 +1,31 @@ +mutation { + databasesCreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..47601df0d8 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-datetime-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..4f525d6b1f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-document.md @@ -0,0 +1,18 @@ +mutation { + databasesCreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-documents.md new file mode 100644 index 0000000000..8ce79dcbb5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-documents.md @@ -0,0 +1,19 @@ +mutation { + databasesCreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..e5845ccd47 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-email-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d13c080e4a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-enum-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesCreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..2a270c3aff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-float-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md new file mode 100644 index 0000000000..c647930943 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: "key", + attributes: [], + orders: [], + lengths: [] + ) { + key + type + status + error + attributes + lengths + orders + _createdAt + _updatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..8c79706817 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-integer-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..0f4ad9e139 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-ip-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..f66b87d6af --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-relationship-attribute.md @@ -0,0 +1,27 @@ +mutation { + databasesCreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..489f9ce015 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-string-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..89ad873e52 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-url-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create.md b/docs/examples/1.8.x/server-graphql/examples/databases/create.md new file mode 100644 index 0000000000..c48e024e7c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create.md @@ -0,0 +1,13 @@ +mutation { + databasesCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..2e7970049d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesDecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, + min: 0 + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..af0f9d6615 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-attribute.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-collection.md new file mode 100644 index 0000000000..8683bd87a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-collection.md @@ -0,0 +1,8 @@ +mutation { + databasesDeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..848371bca0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-documents.md new file mode 100644 index 0000000000..5822d3b950 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-documents.md @@ -0,0 +1,19 @@ +mutation { + databasesDeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-index.md new file mode 100644 index 0000000000..a2389cf9d4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-index.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete.md new file mode 100644 index 0000000000..7cd4c92341 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete.md @@ -0,0 +1,7 @@ +mutation { + databasesDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-attribute.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-collection.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get.md b/docs/examples/1.8.x/server-graphql/examples/databases/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..322ed69ced --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesIncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, + max: 0 + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-collections.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-collections.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list.md b/docs/examples/1.8.x/server-graphql/examples/databases/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..d508e62139 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +mutation { + databasesUpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md new file mode 100644 index 0000000000..040578ae9d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md @@ -0,0 +1,31 @@ +mutation { + databasesUpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..a21b910edc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-datetime-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..aea605d9d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-document.md @@ -0,0 +1,18 @@ +mutation { + databasesUpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-documents.md new file mode 100644 index 0000000000..83c0c07f84 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-documents.md @@ -0,0 +1,20 @@ +mutation { + databasesUpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: "{}", + queries: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..6c83d80e16 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-email-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..378e32f9b8 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-enum-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesUpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..c70232e749 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-float-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..b24af5f260 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-integer-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..7a26224200 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-ip-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..6694540d93 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-relationship-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..f9398c9ca1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-string-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesUpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..f9f14a04f6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-url-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update.md b/docs/examples/1.8.x/server-graphql/examples/databases/update.md new file mode 100644 index 0000000000..88d286dc8a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update.md @@ -0,0 +1,13 @@ +mutation { + databasesUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c381fe35a3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +mutation { + databasesUpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..b4bf914eca --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md @@ -0,0 +1,18 @@ +mutation { + databasesUpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md new file mode 100644 index 0000000000..0e7cc7d19a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md @@ -0,0 +1,24 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate, entrypoint: $entrypoint, commands: $commands) { id }" }, "variables": { "functionId": "<FUNCTION_ID>", "code": null, "activate": false, "entrypoint": "<ENTRYPOINT>", "commands": "<COMMANDS>" } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..cdd92c2a02 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..1479aa3bb6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", + async: false, + path: "<PATH>", + method: "GET", + headers: "{}", + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..12c50c32f3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md @@ -0,0 +1,38 @@ +mutation { + functionsCreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-variable.md new file mode 100644 index 0000000000..6c64922320 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +mutation { + functionsCreateVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..ebfced2c68 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md @@ -0,0 +1,36 @@ +mutation { + functionsCreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create.md b/docs/examples/1.8.x/server-graphql/examples/functions/create.md new file mode 100644 index 0000000000..2df77be8ec --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create.md @@ -0,0 +1,60 @@ +mutation { + functionsCreate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..8d83f28d4f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete-deployment.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete-execution.md new file mode 100644 index 0000000000..c6e950afc9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete-execution.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete-variable.md new file mode 100644 index 0000000000..9bc2d9b6e6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete-variable.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete.md new file mode 100644 index 0000000000..db019bf376 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete.md @@ -0,0 +1,7 @@ +mutation { + functionsDelete( + functionId: "<FUNCTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-variable.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get.md b/docs/examples/1.8.x/server-graphql/examples/functions/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-deployments.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-executions.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-specifications.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-variables.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-variables.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list.md b/docs/examples/1.8.x/server-graphql/examples/functions/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..50df97fd21 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md @@ -0,0 +1,34 @@ +mutation { + functionsUpdateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..3ff2220fda --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-function-deployment.md @@ -0,0 +1,44 @@ +mutation { + functionsUpdateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-variable.md new file mode 100644 index 0000000000..15c8e3bdf3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +mutation { + functionsUpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update.md b/docs/examples/1.8.x/server-graphql/examples/functions/update.md new file mode 100644 index 0000000000..7510cdc50d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update.md @@ -0,0 +1,60 @@ +mutation { + functionsUpdate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-graphql/examples/health/get-antivirus.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-cache.md b/docs/examples/1.8.x/server-graphql/examples/health/get-cache.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-certificate.md b/docs/examples/1.8.x/server-graphql/examples/health/get-certificate.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-d-b.md b/docs/examples/1.8.x/server-graphql/examples/health/get-d-b.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-graphql/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-graphql/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-graphql/examples/health/get-storage-local.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-storage.md b/docs/examples/1.8.x/server-graphql/examples/health/get-storage.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-time.md b/docs/examples/1.8.x/server-graphql/examples/health/get-time.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get.md b/docs/examples/1.8.x/server-graphql/examples/health/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/get.md b/docs/examples/1.8.x/server-graphql/examples/locale/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-codes.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-continents.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-countries.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-languages.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..425b3bb8dc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingCreateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-email.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-email.md new file mode 100644 index 0000000000..a1e35aad19 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-email.md @@ -0,0 +1,30 @@ +mutation { + messagingCreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + cc: [], + bcc: [], + attachments: [], + draft: false, + html: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..0aa48a9e2f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-fcm-provider.md @@ -0,0 +1,18 @@ +mutation { + messagingCreateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: "{}", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..9da1e23847 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +mutation { + messagingCreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "<DOMAIN>", + isEuRegion: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..ddaf2d4c2b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-push.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-push.md new file mode 100644 index 0000000000..92264d1b67 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-push.md @@ -0,0 +1,37 @@ +mutation { + messagingCreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", + body: "<BODY>", + topics: [], + users: [], + targets: [], + data: "{}", + action: "<ACTION>", + image: "[ID1:ID2]", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 0, + draft: false, + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..cda0652d67 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingCreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sms.md new file mode 100644 index 0000000000..99af83b154 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sms.md @@ -0,0 +1,25 @@ +mutation { + messagingCreateSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + draft: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..b7b24bc1a5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +mutation { + messagingCreateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, + username: "<USERNAME>", + password: "<PASSWORD>", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bab53612b7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,27 @@ +mutation { + messagingCreateSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..7960a8427f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..e082097b70 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + username: "<USERNAME>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-topic.md new file mode 100644 index 0000000000..6216c4cda5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +mutation { + messagingCreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..ac14d1d32b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..ca7a710896 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..8d9ac35953 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-provider.md @@ -0,0 +1,7 @@ +mutation { + messagingDeleteProvider( + providerId: "<PROVIDER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ededffcaac --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +mutation { + messagingDeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..e49cd1ed91 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-topic.md @@ -0,0 +1,7 @@ +mutation { + messagingDeleteTopic( + topicId: "<TOPIC_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete.md new file mode 100644 index 0000000000..495557ef18 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete.md @@ -0,0 +1,7 @@ +mutation { + messagingDelete( + messageId: "<MESSAGE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-message.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-message.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-provider.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-topic.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-messages.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-providers.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-targets.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-topics.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..b3d6e8745e --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingUpdateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-email.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-email.md new file mode 100644 index 0000000000..1d1302efc4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-email.md @@ -0,0 +1,30 @@ +mutation { + messagingUpdateEmail( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + subject: "<SUBJECT>", + content: "<CONTENT>", + draft: false, + html: false, + cc: [], + bcc: [], + scheduledAt: "", + attachments: [] + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..a0b3f9e3da --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-fcm-provider.md @@ -0,0 +1,18 @@ +mutation { + messagingUpdateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + serviceAccountJSON: "{}" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..6c26d52ff2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +mutation { + messagingUpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "<DOMAIN>", + isEuRegion: false, + enabled: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..a6552a4734 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-push.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-push.md new file mode 100644 index 0000000000..8ee2f57610 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-push.md @@ -0,0 +1,37 @@ +mutation { + messagingUpdatePush( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + title: "<TITLE>", + body: "<BODY>", + data: "{}", + action: "<ACTION>", + image: "[ID1:ID2]", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 0, + draft: false, + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..319dcea461 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingUpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sms.md new file mode 100644 index 0000000000..7b45f09abc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sms.md @@ -0,0 +1,25 @@ +mutation { + messagingUpdateSms( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + content: "<CONTENT>", + draft: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..a091685655 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +mutation { + messagingUpdateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, + username: "<USERNAME>", + password: "<PASSWORD>", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..c9c96c0d5d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..3fd68ed8e9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + username: "<USERNAME>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-topic.md new file mode 100644 index 0000000000..8d3dc84c72 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +mutation { + messagingUpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..6f10839567 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..f42670a428 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md new file mode 100644 index 0000000000..8f77dd60eb --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md @@ -0,0 +1,24 @@ +POST /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { sitesCreateDeployment(siteId: $siteId, code: $code, activate: $activate, installCommand: $installCommand, buildCommand: $buildCommand, outputDirectory: $outputDirectory) { id }" }, "variables": { "siteId": "<SITE_ID>", "code": null, "activate": false, "installCommand": "<INSTALL_COMMAND>", "buildCommand": "<BUILD_COMMAND>", "outputDirectory": "<OUTPUT_DIRECTORY>" } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..6226282651 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,34 @@ +mutation { + sitesCreateDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..72562556e4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md @@ -0,0 +1,38 @@ +mutation { + sitesCreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-variable.md new file mode 100644 index 0000000000..6bc92de43a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +mutation { + sitesCreateVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..ccc18cf2e0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md @@ -0,0 +1,36 @@ +mutation { + sitesCreateVcsDeployment( + siteId: "<SITE_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create.md b/docs/examples/1.8.x/server-graphql/examples/sites/create.md new file mode 100644 index 0000000000..bb89ac9344 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create.md @@ -0,0 +1,61 @@ +mutation { + sitesCreate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + buildRuntime: "node-14.5", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + adapter: "static", + installationId: "<INSTALLATION_ID>", + fallbackFile: "<FALLBACK_FILE>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..443a951cee --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete-deployment.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete-log.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete-log.md new file mode 100644 index 0000000000..60f27218c0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete-log.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete-variable.md new file mode 100644 index 0000000000..2f86eddff1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete-variable.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete.md new file mode 100644 index 0000000000..35138f6d4f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete.md @@ -0,0 +1,7 @@ +mutation { + sitesDelete( + siteId: "<SITE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-log.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-log.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-variable.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get.md b/docs/examples/1.8.x/server-graphql/examples/sites/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-deployments.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-logs.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-specifications.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-variables.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-variables.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list.md b/docs/examples/1.8.x/server-graphql/examples/sites/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..92751c167f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md @@ -0,0 +1,34 @@ +mutation { + sitesUpdateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..6c09c03735 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-site-deployment.md @@ -0,0 +1,45 @@ +mutation { + sitesUpdateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-variable.md new file mode 100644 index 0000000000..240dca60f3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +mutation { + sitesUpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update.md b/docs/examples/1.8.x/server-graphql/examples/sites/update.md new file mode 100644 index 0000000000..801eca3161 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update.md @@ -0,0 +1,61 @@ +mutation { + sitesUpdate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + buildRuntime: "node-14.5", + adapter: "static", + fallbackFile: "<FALLBACK_FILE>", + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/create-bucket.md new file mode 100644 index 0000000000..45d03802d2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/create-bucket.md @@ -0,0 +1,27 @@ +mutation { + storageCreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..5b4f9a0c22 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md @@ -0,0 +1,26 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { id }" }, "variables": { "bucketId": "<BUCKET_ID>", "fileId": "<FILE_ID>", "file": null, "permissions": ["read("any")"] } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..3dadd1f072 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +mutation { + storageDeleteBucket( + bucketId: "<BUCKET_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/delete-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..17ec89931a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-graphql/examples/storage/list-buckets.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/list-files.md b/docs/examples/1.8.x/server-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/update-bucket.md new file mode 100644 index 0000000000..8265a15a58 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/update-bucket.md @@ -0,0 +1,27 @@ +mutation { + storageUpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/update-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..b7832048c7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/update-file.md @@ -0,0 +1,20 @@ +mutation { + storageUpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", + permissions: ["read("any")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..564b1a964c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesCreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..34055c27fa --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md new file mode 100644 index 0000000000..a45001d0be --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..5d1c516e3a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesCreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md new file mode 100644 index 0000000000..09bf481a33 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md new file mode 100644 index 0000000000..bc47403c64 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: "key", + columns: [], + orders: [], + lengths: [] + ) { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..04273b18b5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..c2f07c760b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8e56bd3867 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md @@ -0,0 +1,27 @@ +mutation { + tablesCreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md new file mode 100644 index 0000000000..c88a7f36cf --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md new file mode 100644 index 0000000000..a4ae62cfae --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md new file mode 100644 index 0000000000..b0b11c2610 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md new file mode 100644 index 0000000000..134208b432 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create.md b/docs/examples/1.8.x/server-graphql/examples/tables/create.md new file mode 100644 index 0000000000..73af2c4a8c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create.md @@ -0,0 +1,31 @@ +mutation { + tablesCreate( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..4ee58849ff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + min: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md new file mode 100644 index 0000000000..2c2ab098d6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md new file mode 100644 index 0000000000..c95db41fd6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md new file mode 100644 index 0000000000..f3a35c1df1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md new file mode 100644 index 0000000000..1ee227b7e5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesDeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md new file mode 100644 index 0000000000..1749422f6a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md @@ -0,0 +1,8 @@ +mutation { + tablesDelete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get.md b/docs/examples/1.8.x/server-graphql/examples/tables/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..f84f149672 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesIncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + max: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list.md b/docs/examples/1.8.x/server-graphql/examples/tables/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..541abd97cc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesUpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..01714377a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md new file mode 100644 index 0000000000..ffb3a21e66 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..45ddb00d6f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesUpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md new file mode 100644 index 0000000000..f592a53858 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..a51f02d4d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..c353c79105 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..e94800345b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md new file mode 100644 index 0000000000..8449d8499b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md new file mode 100644 index 0000000000..510648f6e1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md @@ -0,0 +1,20 @@ +mutation { + tablesUpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: "{}", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md new file mode 100644 index 0000000000..0771d9a6af --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md @@ -0,0 +1,23 @@ +mutation { + tablesUpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md new file mode 100644 index 0000000000..a5c4a4432d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update.md b/docs/examples/1.8.x/server-graphql/examples/tables/update.md new file mode 100644 index 0000000000..4aa434c3ed --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update.md @@ -0,0 +1,31 @@ +mutation { + tablesUpdate( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md new file mode 100644 index 0000000000..480d7651bd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +mutation { + tablesUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..6015470c16 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md @@ -0,0 +1,18 @@ +mutation { + tablesUpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/create-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..fe741f080d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +mutation { + teamsCreateMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", + userId: "<USER_ID>", + phone: "+12065550100", + url: "https://example.com", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/create.md b/docs/examples/1.8.x/server-graphql/examples/teams/create.md new file mode 100644 index 0000000000..1f2a7ab3f2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/create.md @@ -0,0 +1,16 @@ +mutation { + teamsCreate( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e391b6f6fa --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/delete.md b/docs/examples/1.8.x/server-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..df0d36c5b5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "<TEAM_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/get-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/get.md b/docs/examples/1.8.x/server-graphql/examples/teams/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/list.md b/docs/examples/1.8.x/server-graphql/examples/teams/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9b24450a86 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,22 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..1c6a04f078 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-name.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..c40543b5cd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "<TEAM_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..95737e33f9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "<TEAM_ID>", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-graphql/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..22cff062fa --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +mutation { + tokensCreateFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "" + ) { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/delete.md b/docs/examples/1.8.x/server-graphql/examples/tokens/delete.md new file mode 100644 index 0000000000..b13ad72f6b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tokens/delete.md @@ -0,0 +1,7 @@ +mutation { + tokensDelete( + tokenId: "<TOKEN_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/get.md b/docs/examples/1.8.x/server-graphql/examples/tokens/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/list.md b/docs/examples/1.8.x/server-graphql/examples/tokens/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/update.md b/docs/examples/1.8.x/server-graphql/examples/tokens/update.md new file mode 100644 index 0000000000..2f7324fd04 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tokens/update.md @@ -0,0 +1,14 @@ +mutation { + tokensUpdate( + tokenId: "<TOKEN_ID>", + expire: "" + ) { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md new file mode 100644 index 0000000000..7f99622e52 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..26659176eb --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-bcrypt-user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..bf0b1bd638 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md @@ -0,0 +1,9 @@ +mutation { + usersCreateJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", + duration: 0 + ) { + jwt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..7e642b8233 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..7c4f1c5575 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +mutation { + usersCreateMfaRecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..4c06b007a2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md @@ -0,0 +1,40 @@ +mutation { + usersCreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..f99da2752d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md @@ -0,0 +1,41 @@ +mutation { + usersCreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: "sha1", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..624ffcdd38 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,43 @@ +mutation { + usersCreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..68a5f4c75f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-user.md @@ -0,0 +1,45 @@ +mutation { + usersCreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-session.md b/docs/examples/1.8.x/server-graphql/examples/users/create-session.md new file mode 100644 index 0000000000..701ddf501f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-session.md @@ -0,0 +1,35 @@ +mutation { + usersCreateSession( + userId: "<USER_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-target.md b/docs/examples/1.8.x/server-graphql/examples/users/create-target.md new file mode 100644 index 0000000000..7068c21aba --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-target.md @@ -0,0 +1,20 @@ +mutation { + usersCreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: "email", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-token.md b/docs/examples/1.8.x/server-graphql/examples/users/create-token.md new file mode 100644 index 0000000000..78255f7676 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-token.md @@ -0,0 +1,14 @@ +mutation { + usersCreateToken( + userId: "<USER_ID>", + length: 4, + expire: 60 + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create.md b/docs/examples/1.8.x/server-graphql/examples/users/create.md new file mode 100644 index 0000000000..465da80432 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create.md @@ -0,0 +1,41 @@ +mutation { + usersCreate( + userId: "<USER_ID>", + email: "email@example.com", + phone: "+12065550100", + password: "", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-identity.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-identity.md new file mode 100644 index 0000000000..1ea0d990b1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..43f73404f0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteMfaAuthenticator( + userId: "<USER_ID>", + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-session.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-session.md new file mode 100644 index 0000000000..7e6538b34a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-session.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-sessions.md new file mode 100644 index 0000000000..d1ccaa26f4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteSessions( + userId: "<USER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-target.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-target.md new file mode 100644 index 0000000000..92d0a16ac5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-target.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete.md b/docs/examples/1.8.x/server-graphql/examples/users/delete.md new file mode 100644 index 0000000000..2cf392b7f1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete.md @@ -0,0 +1,7 @@ +mutation { + usersDelete( + userId: "<USER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get-prefs.md b/docs/examples/1.8.x/server-graphql/examples/users/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get-target.md b/docs/examples/1.8.x/server-graphql/examples/users/get-target.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get.md b/docs/examples/1.8.x/server-graphql/examples/users/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-identities.md b/docs/examples/1.8.x/server-graphql/examples/users/list-identities.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-logs.md b/docs/examples/1.8.x/server-graphql/examples/users/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-memberships.md b/docs/examples/1.8.x/server-graphql/examples/users/list-memberships.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-graphql/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-sessions.md b/docs/examples/1.8.x/server-graphql/examples/users/list-sessions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-targets.md b/docs/examples/1.8.x/server-graphql/examples/users/list-targets.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list.md b/docs/examples/1.8.x/server-graphql/examples/users/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-graphql/examples/users/update-email-verification.md new file mode 100644 index 0000000000..cda7278ac0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-email-verification.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateEmailVerification( + userId: "<USER_ID>", + emailVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-email.md b/docs/examples/1.8.x/server-graphql/examples/users/update-email.md new file mode 100644 index 0000000000..408a74972b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-email.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateEmail( + userId: "<USER_ID>", + email: "email@example.com" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-labels.md b/docs/examples/1.8.x/server-graphql/examples/users/update-labels.md new file mode 100644 index 0000000000..cb3c5b6483 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-labels.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateLabels( + userId: "<USER_ID>", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..dbef2bd345 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +mutation { + usersUpdateMfaRecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-mfa.md b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa.md new file mode 100644 index 0000000000..ac09ea19a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateMfa( + userId: "<USER_ID>", + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-name.md b/docs/examples/1.8.x/server-graphql/examples/users/update-name.md new file mode 100644 index 0000000000..ec7e3dc27c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-name.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateName( + userId: "<USER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-password.md b/docs/examples/1.8.x/server-graphql/examples/users/update-password.md new file mode 100644 index 0000000000..95ef74c83d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-password.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePassword( + userId: "<USER_ID>", + password: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-graphql/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..c6afa54ba4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-phone-verification.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-phone.md b/docs/examples/1.8.x/server-graphql/examples/users/update-phone.md new file mode 100644 index 0000000000..d3fc7d5f37 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-phone.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePhone( + userId: "<USER_ID>", + number: "+12065550100" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-prefs.md b/docs/examples/1.8.x/server-graphql/examples/users/update-prefs.md new file mode 100644 index 0000000000..431664c2a1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + usersUpdatePrefs( + userId: "<USER_ID>", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-status.md b/docs/examples/1.8.x/server-graphql/examples/users/update-status.md new file mode 100644 index 0000000000..2499c1c258 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-status.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateStatus( + userId: "<USER_ID>", + status: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-target.md b/docs/examples/1.8.x/server-graphql/examples/users/update-target.md new file mode 100644 index 0000000000..1f7cc1147a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-target.md @@ -0,0 +1,19 @@ +mutation { + usersUpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-anonymous-session.md b/docs/examples/1.8.x/server-kotlin/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..d65c20a600 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-email-password-session.md b/docs/examples/1.8.x/server-kotlin/java/account/create-email-password-session.md new file mode 100644 index 0000000000..633931089f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-email-password-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-email-token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-email-token.md new file mode 100644 index 0000000000..7a6a0d7fea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-email-token.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createEmailToken( + "<USER_ID>", // userId + "email@example.com", // email + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md new file mode 100644 index 0000000000..3756edee25 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createJWT(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..df021f9568 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createMagicURLToken( + "<USER_ID>", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ee37e48794 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-challenge.md new file mode 100644 index 0000000000..4a07e26e49 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createMfaChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..eb76cdca9b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md new file mode 100644 index 0000000000..5b325f5c61 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-phone-token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-token.md new file mode 100644 index 0000000000..14fb812687 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-token.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createPhoneToken( + "<USER_ID>", // userId + "+12065550100", // phone + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-phone-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-verification.md new file mode 100644 index 0000000000..9e49c62880 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-verification.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-recovery.md b/docs/examples/1.8.x/server-kotlin/java/account/create-recovery.md new file mode 100644 index 0000000000..f529ea4cb7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-recovery.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-session.md b/docs/examples/1.8.x/server-kotlin/java/account/create-session.md new file mode 100644 index 0000000000..5bcdf99059 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/create-verification.md new file mode 100644 index 0000000000..65c8e8be49 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create.md b/docs/examples/1.8.x/server-kotlin/java/account/create.md new file mode 100644 index 0000000000..d24bfb8592 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.create( + "<USER_ID>", // userId + "email@example.com", // email + "", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-identity.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-identity.md new file mode 100644 index 0000000000..0d6f860a63 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-identity.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..06835f6680 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-session.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-session.md new file mode 100644 index 0000000000..fd27d746b1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-sessions.md new file mode 100644 index 0000000000..11076e72d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c818c3ea74 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get-prefs.md b/docs/examples/1.8.x/server-kotlin/java/account/get-prefs.md new file mode 100644 index 0000000000..6614f92aaa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get-prefs.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get-session.md b/docs/examples/1.8.x/server-kotlin/java/account/get-session.md new file mode 100644 index 0000000000..3f30d90256 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get.md b/docs/examples/1.8.x/server-kotlin/java/account/get.md new file mode 100644 index 0000000000..70e2dfb97f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-identities.md b/docs/examples/1.8.x/server-kotlin/java/account/list-identities.md new file mode 100644 index 0000000000..ceb4b3099a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-identities.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listIdentities( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-logs.md b/docs/examples/1.8.x/server-kotlin/java/account/list-logs.md new file mode 100644 index 0000000000..de22fcec6a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-logs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listLogs( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/java/account/list-mfa-factors.md new file mode 100644 index 0000000000..d9f90a4127 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-mfa-factors.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listMfaFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-sessions.md b/docs/examples/1.8.x/server-kotlin/java/account/list-sessions.md new file mode 100644 index 0000000000..557832df82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-email.md b/docs/examples/1.8.x/server-kotlin/java/account/update-email.md new file mode 100644 index 0000000000..8529ba6a26 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-email.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md b/docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md new file mode 100644 index 0000000000..d1b60c5473 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..b4735f49ea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..947c85a244 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaAuthenticator( + AuthenticatorType.TOTP, // type + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-challenge.md new file mode 100644 index 0000000000..b9b0ae9db5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-challenge.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaChallenge( + "<CHALLENGE_ID>", // challengeId + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..4b3e52700b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-name.md b/docs/examples/1.8.x/server-kotlin/java/account/update-name.md new file mode 100644 index 0000000000..749fe268af --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateName( + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-password.md b/docs/examples/1.8.x/server-kotlin/java/account/update-password.md new file mode 100644 index 0000000000..8eaa08b460 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-password.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePassword( + "", // password + "password", // oldPassword (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-phone-session.md b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-session.md new file mode 100644 index 0000000000..cbfdca58ec --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-verification.md new file mode 100644 index 0000000000..998826544a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePhoneVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-phone.md b/docs/examples/1.8.x/server-kotlin/java/account/update-phone.md new file mode 100644 index 0000000000..d54aa9cfb2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-phone.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-prefs.md b/docs/examples/1.8.x/server-kotlin/java/account/update-prefs.md new file mode 100644 index 0000000000..0e900d0a66 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-recovery.md b/docs/examples/1.8.x/server-kotlin/java/account/update-recovery.md new file mode 100644 index 0000000000..8ab16e18ce --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-recovery.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateRecovery( + "<USER_ID>", // userId + "<SECRET>", // secret + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-session.md b/docs/examples/1.8.x/server-kotlin/java/account/update-session.md new file mode 100644 index 0000000000..8233c054f5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-status.md b/docs/examples/1.8.x/server-kotlin/java/account/update-status.md new file mode 100644 index 0000000000..d5f4f79476 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-status.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/update-verification.md new file mode 100644 index 0000000000..dafe6db457 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-browser.md new file mode 100644 index 0000000000..9c3433eef5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-browser.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..6904638106 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-credit-card.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-favicon.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-favicon.md new file mode 100644 index 0000000000..f4e89cfadc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-favicon.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-flag.md new file mode 100644 index 0000000000..159dcdcde6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-flag.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-image.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-image.md new file mode 100644 index 0000000000..afad760c38 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-image.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-initials.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-initials.md new file mode 100644 index 0000000000..171b636f02 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-initials.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + "<NAME>", // name (optional) + 0, // width (optional) + 0, // height (optional) + "", // background (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md new file mode 100644 index 0000000000..113fd1fceb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "<TEXT>", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..7585471443 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-boolean-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md new file mode 100644 index 0000000000..8ec51e698a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..d95e048b09 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-datetime-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md new file mode 100644 index 0000000000..368b816219 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.createDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md new file mode 100644 index 0000000000..77d79812a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-email-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-email-attribute.md new file mode 100644 index 0000000000..b2ecc99a17 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-email-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-enum-attribute.md new file mode 100644 index 0000000000..44202086b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-enum-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-float-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-float-attribute.md new file mode 100644 index 0000000000..2263cdb5c6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-float-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-index.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-index.md new file mode 100644 index 0000000000..fe2d9bf66d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + IndexType.KEY, // type + listOf(), // attributes + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-integer-attribute.md new file mode 100644 index 0000000000..b084e7c974 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-integer-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-ip-attribute.md new file mode 100644 index 0000000000..ba62dba1d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-ip-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..a67f452647 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-relationship-attribute.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<RELATED_COLLECTION_ID>", // relatedCollectionId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-string-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-string-attribute.md new file mode 100644 index 0000000000..3286c7aa01 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-string-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-url-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-url-attribute.md new file mode 100644 index 0000000000..d445d67e33 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-url-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create.md b/docs/examples/1.8.x/server-kotlin/java/databases/create.md new file mode 100644 index 0000000000..31cd37e169 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..34b74726ff --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.decrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "", // attribute + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-attribute.md new file mode 100644 index 0000000000..236d492adb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-collection.md new file mode 100644 index 0000000000..5da2a3d684 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-document.md new file mode 100644 index 0000000000..f6e6209f36 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-document.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.deleteDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-documents.md new file mode 100644 index 0000000000..e8394b1ff9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-index.md new file mode 100644 index 0000000000..6f68435779 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete.md new file mode 100644 index 0000000000..b082491383 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-attribute.md new file mode 100644 index 0000000000..672f0b062e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-collection.md new file mode 100644 index 0000000000..59401be370 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-document.md new file mode 100644 index 0000000000..2719073a7d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.getDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-index.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-index.md new file mode 100644 index 0000000000..61cfe84ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get.md b/docs/examples/1.8.x/server-kotlin/java/databases/get.md new file mode 100644 index 0000000000..b0e3742149 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md new file mode 100644 index 0000000000..ca9c357f19 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.incrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "", // attribute + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-attributes.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-attributes.md new file mode 100644 index 0000000000..9681831a35 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-attributes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listAttributes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-collections.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-collections.md new file mode 100644 index 0000000000..32534474e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-collections.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listCollections( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-documents.md new file mode 100644 index 0000000000..36982c0eb0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.listDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-indexes.md new file mode 100644 index 0000000000..8c912bb36c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listIndexes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list.md b/docs/examples/1.8.x/server-kotlin/java/databases/list.md new file mode 100644 index 0000000000..758b9f75fe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..3c95851027 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-boolean-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md new file mode 100644 index 0000000000..6805c1149d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..3f451b83f2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-datetime-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md new file mode 100644 index 0000000000..f7b05c9601 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.updateDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-documents.md new file mode 100644 index 0000000000..b4138b41d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-documents.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-email-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-email-attribute.md new file mode 100644 index 0000000000..1ff12217ba --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-email-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-enum-attribute.md new file mode 100644 index 0000000000..89606806d9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-enum-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-float-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-float-attribute.md new file mode 100644 index 0000000000..0076987f85 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-float-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-integer-attribute.md new file mode 100644 index 0000000000..c39af22b36 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-integer-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-ip-attribute.md new file mode 100644 index 0000000000..44b4da2abc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-ip-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..8af20e91a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-relationship-attribute.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-string-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-string-attribute.md new file mode 100644 index 0000000000..1f156f3dbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-string-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-url-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-url-attribute.md new file mode 100644 index 0000000000..959054ab48 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-url-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update.md b/docs/examples/1.8.x/server-kotlin/java/databases/update.md new file mode 100644 index 0000000000..9928dae6f6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md new file mode 100644 index 0000000000..b1b4de4db4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.upsertDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md new file mode 100644 index 0000000000..0bf0c1778c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.upsertDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-deployment.md new file mode 100644 index 0000000000..6e435f41fa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createDeployment( + "<FUNCTION_ID>", // functionId + InputFile.fromPath("file.png"), // code + false, // activate + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..6b9d9a131a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-duplicate-deployment.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createDuplicateDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + "<BUILD_ID>", // buildId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md new file mode 100644 index 0000000000..82d48fa55b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.createExecution( + "<FUNCTION_ID>", // functionId + "<BODY>", // body (optional) + false, // async (optional) + "<PATH>", // path (optional) + ExecutionMethod.GET, // method (optional) + mapOf( "a" to "b" ), // headers (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-template-deployment.md new file mode 100644 index 0000000000..53b5a9ae6a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createTemplateDeployment( + "<FUNCTION_ID>", // functionId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-variable.md new file mode 100644 index 0000000000..70764fbdc8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-variable.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVariable( + "<FUNCTION_ID>", // functionId + "<KEY>", // key + "<VALUE>", // value + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..9274cd88c7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVcsDeployment( + "<FUNCTION_ID>", // functionId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create.md b/docs/examples/1.8.x/server-kotlin/java/functions/create.md new file mode 100644 index 0000000000..71871287bb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.Runtime; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.create( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + .NODE_14_5, // runtime + listOf("any"), // execute (optional) + listOf(), // events (optional) + "", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + listOf(), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete-deployment.md new file mode 100644 index 0000000000..1a6279ff3f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete-execution.md new file mode 100644 index 0000000000..68f81e8ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete-execution.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete-variable.md new file mode 100644 index 0000000000..c881bdc800 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete.md new file mode 100644 index 0000000000..255fc002fa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.delete( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment-download.md new file mode 100644 index 0000000000..d522b12caf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeploymentDownload( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment.md new file mode 100644 index 0000000000..b3000272b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-execution.md new file mode 100644 index 0000000000..76e302fa82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-execution.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.getExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-variable.md new file mode 100644 index 0000000000..d54882b293 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get.md b/docs/examples/1.8.x/server-kotlin/java/functions/get.md new file mode 100644 index 0000000000..aa55b93e07 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.get( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-deployments.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-deployments.md new file mode 100644 index 0000000000..16a10ca4a2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-deployments.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listDeployments( + "<FUNCTION_ID>", // functionId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-executions.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-executions.md new file mode 100644 index 0000000000..25a9af80aa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-executions.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.listExecutions( + "<FUNCTION_ID>", // functionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-runtimes.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-runtimes.md new file mode 100644 index 0000000000..304a90d0da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-runtimes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listRuntimes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-specifications.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-specifications.md new file mode 100644 index 0000000000..e6c9c091d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-specifications.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-variables.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-variables.md new file mode 100644 index 0000000000..98c9ff4527 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-variables.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listVariables( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list.md b/docs/examples/1.8.x/server-kotlin/java/functions/list.md new file mode 100644 index 0000000000..a9a320660d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/java/functions/update-deployment-status.md new file mode 100644 index 0000000000..8755fd9305 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update-deployment-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateDeploymentStatus( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update-function-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/update-function-deployment.md new file mode 100644 index 0000000000..b88e87c1b9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update-function-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateFunctionDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/update-variable.md new file mode 100644 index 0000000000..3a2b281332 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update-variable.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update.md b/docs/examples/1.8.x/server-kotlin/java/functions/update.md new file mode 100644 index 0000000000..5956c57b73 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update.md @@ -0,0 +1,40 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.update( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + .NODE_14_5, // runtime (optional) + listOf("any"), // execute (optional) + listOf(), // events (optional) + "", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + listOf(), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/graphql/mutation.md b/docs/examples/1.8.x/server-kotlin/java/graphql/mutation.md new file mode 100644 index 0000000000..778892457b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/graphql/mutation.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/graphql/query.md b/docs/examples/1.8.x/server-kotlin/java/graphql/query.md new file mode 100644 index 0000000000..e109d523f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/graphql/query.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-antivirus.md b/docs/examples/1.8.x/server-kotlin/java/health/get-antivirus.md new file mode 100644 index 0000000000..ca3abf7100 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-antivirus.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getAntivirus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-cache.md b/docs/examples/1.8.x/server-kotlin/java/health/get-cache.md new file mode 100644 index 0000000000..24a584c04b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-cache.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getCache(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-certificate.md b/docs/examples/1.8.x/server-kotlin/java/health/get-certificate.md new file mode 100644 index 0000000000..f4cb5a4e1e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-certificate.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getCertificate( + "", // domain (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md b/docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md new file mode 100644 index 0000000000..c7a7bef903 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getDB(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-failed-jobs.md b/docs/examples/1.8.x/server-kotlin/java/health/get-failed-jobs.md new file mode 100644 index 0000000000..d2b81bd0bf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-failed-jobs.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; +import io.appwrite.enums.Name; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getFailedJobs( + .V1_DATABASE, // name + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-pub-sub.md b/docs/examples/1.8.x/server-kotlin/java/health/get-pub-sub.md new file mode 100644 index 0000000000..70210c4296 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-pub-sub.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getPubSub(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-builds.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-builds.md new file mode 100644 index 0000000000..2ca5d7f4e4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-builds.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueBuilds( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-certificates.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-certificates.md new file mode 100644 index 0000000000..519817ae46 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-certificates.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueCertificates( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-databases.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-databases.md new file mode 100644 index 0000000000..2f175668eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-databases.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueDatabases( + "<NAME>", // name (optional) + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-deletes.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-deletes.md new file mode 100644 index 0000000000..e65aa9a528 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-deletes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueDeletes( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-functions.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-functions.md new file mode 100644 index 0000000000..720f114acb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-functions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueFunctions( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-logs.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-logs.md new file mode 100644 index 0000000000..09b0de4e63 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-logs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueLogs( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-mails.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-mails.md new file mode 100644 index 0000000000..b1ae357aef --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-mails.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMails( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-messaging.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-messaging.md new file mode 100644 index 0000000000..61c0b8cad7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-messaging.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMessaging( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-migrations.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-migrations.md new file mode 100644 index 0000000000..0e7d669e7f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-migrations.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMigrations( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..e2f8062fcc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-stats-resources.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueStatsResources( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-usage.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-usage.md new file mode 100644 index 0000000000..bfda61a544 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-usage.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueUsage( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d9aed66db6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-webhooks.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueWebhooks( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-storage-local.md b/docs/examples/1.8.x/server-kotlin/java/health/get-storage-local.md new file mode 100644 index 0000000000..65367cc252 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-storage-local.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getStorageLocal(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-storage.md b/docs/examples/1.8.x/server-kotlin/java/health/get-storage.md new file mode 100644 index 0000000000..3a0f0f8ed3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-storage.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getStorage(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-time.md b/docs/examples/1.8.x/server-kotlin/java/health/get-time.md new file mode 100644 index 0000000000..f0ba668ab8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-time.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getTime(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get.md b/docs/examples/1.8.x/server-kotlin/java/health/get.md new file mode 100644 index 0000000000..87a7c0a32d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/get.md b/docs/examples/1.8.x/server-kotlin/java/locale/get.md new file mode 100644 index 0000000000..2d5e0ac06d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-codes.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-codes.md new file mode 100644 index 0000000000..9f07d1dbf1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-continents.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-continents.md new file mode 100644 index 0000000000..5d9e4b0fdb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-continents.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..232a0ef8cf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-phones.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..a4739a5b93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-phones.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-countries.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries.md new file mode 100644 index 0000000000..5b8f250f3c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-currencies.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-currencies.md new file mode 100644 index 0000000000..adf1d787c1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-currencies.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-languages.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-languages.md new file mode 100644 index 0000000000..c92ea525f7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-languages.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-apns-provider.md new file mode 100644 index 0000000000..0f6618079f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-apns-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createApnsProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-email.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-email.md new file mode 100644 index 0000000000..d6ab5ee1bf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-email.md @@ -0,0 +1,34 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createEmail( + "<MESSAGE_ID>", // messageId + "<SUBJECT>", // subject + "<CONTENT>", // content + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + listOf(), // cc (optional) + listOf(), // bcc (optional) + listOf(), // attachments (optional) + false, // draft (optional) + false, // html (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..636a1bdd39 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-fcm-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createFcmProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..272f9d2356 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-mailgun-provider.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) + false, // isEuRegion (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md new file mode 100644 index 0000000000..21005293ea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-push.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-push.md new file mode 100644 index 0000000000..277ab9655c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-push.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createPush( + "<MESSAGE_ID>", // messageId + "<TITLE>", // title (optional) + "<BODY>", // body (optional) + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + mapOf( "a" to "b" ), // data (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 0, // badge (optional) + false, // draft (optional) + "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..84c5bf42f9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sendgrid-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-sms.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sms.md new file mode 100644 index 0000000000..9e3e3bdf5d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sms.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSms( + "<MESSAGE_ID>", // messageId + "<CONTENT>", // content + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..ebd153c29c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-smtp-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSmtpProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<HOST>", // host + 1, // port (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-subscriber.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-subscriber.md new file mode 100644 index 0000000000..1ccb8fe60c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-subscriber.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..6b64499419 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-telesign-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..477d7d8c4b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-textmagic-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-topic.md new file mode 100644 index 0000000000..63a24b467d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-topic.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name + listOf("any"), // subscribe (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..8d1b4da970 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-twilio-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..db1e476db2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-vonage-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-provider.md new file mode 100644 index 0000000000..b0fa837feb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.deleteProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-subscriber.md new file mode 100644 index 0000000000..a3635b9db7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-topic.md new file mode 100644 index 0000000000..7b598b25f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-topic.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.deleteTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete.md new file mode 100644 index 0000000000..1395a39245 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.delete( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-message.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-message.md new file mode 100644 index 0000000000..3860ff2347 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-message.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getMessage( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-provider.md new file mode 100644 index 0000000000..9717b90b7d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-subscriber.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-subscriber.md new file mode 100644 index 0000000000..641a494b5c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-topic.md new file mode 100644 index 0000000000..c9f2eff74b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-topic.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-message-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-message-logs.md new file mode 100644 index 0000000000..0f94e46cd1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-message-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listMessageLogs( + "<MESSAGE_ID>", // messageId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-messages.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-messages.md new file mode 100644 index 0000000000..006ba7c27f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-messages.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listMessages( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-provider-logs.md new file mode 100644 index 0000000000..5f77f2d03d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-provider-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listProviderLogs( + "<PROVIDER_ID>", // providerId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-providers.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-providers.md new file mode 100644 index 0000000000..b069dda04c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-providers.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listProviders( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..b10e446a66 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscriber-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listSubscriberLogs( + "<SUBSCRIBER_ID>", // subscriberId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscribers.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscribers.md new file mode 100644 index 0000000000..52ca5b0d01 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscribers.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listSubscribers( + "<TOPIC_ID>", // topicId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-targets.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-targets.md new file mode 100644 index 0000000000..5b9f40e873 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-targets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTargets( + "<MESSAGE_ID>", // messageId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topic-logs.md new file mode 100644 index 0000000000..b2e9444419 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topic-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTopicLogs( + "<TOPIC_ID>", // topicId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-topics.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topics.md new file mode 100644 index 0000000000..e6408a60e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topics.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTopics( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-apns-provider.md new file mode 100644 index 0000000000..737a142495 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-apns-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateApnsProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-email.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-email.md new file mode 100644 index 0000000000..56e9767861 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-email.md @@ -0,0 +1,34 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateEmail( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<SUBJECT>", // subject (optional) + "<CONTENT>", // content (optional) + false, // draft (optional) + false, // html (optional) + listOf(), // cc (optional) + listOf(), // bcc (optional) + "", // scheduledAt (optional) + listOf(), // attachments (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..68c56ef18e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-fcm-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateFcmProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..5547ae8575 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-mailgun-provider.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md new file mode 100644 index 0000000000..d8e485629b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-push.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-push.md new file mode 100644 index 0000000000..b7038de6a4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-push.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updatePush( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<TITLE>", // title (optional) + "<BODY>", // body (optional) + mapOf( "a" to "b" ), // data (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 0, // badge (optional) + false, // draft (optional) + "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..14a4e99f5b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sendgrid-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-sms.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sms.md new file mode 100644 index 0000000000..c55cfdfddb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sms.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSms( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<CONTENT>", // content (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..3f39661024 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-smtp-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSmtpProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<HOST>", // host (optional) + 1, // port (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..8181bf1c82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-telesign-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..bc156b7a31 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-textmagic-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-topic.md new file mode 100644 index 0000000000..be9c44dc23 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-topic.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name (optional) + listOf("any"), // subscribe (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..ed58ee9a24 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-twilio-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..d5bfe3610c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-vonage-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-deployment.md new file mode 100644 index 0000000000..f370f802eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-deployment.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDeployment( + "<SITE_ID>", // siteId + InputFile.fromPath("file.png"), // code + false, // activate + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..35e43b8943 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-duplicate-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDuplicateDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-template-deployment.md new file mode 100644 index 0000000000..63aba4a067 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createTemplateDeployment( + "<SITE_ID>", // siteId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-variable.md new file mode 100644 index 0000000000..c77bec3796 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-variable.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVariable( + "<SITE_ID>", // siteId + "<KEY>", // key + "<VALUE>", // value + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..754eb26419 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVcsDeployment( + "<SITE_ID>", // siteId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create.md b/docs/examples/1.8.x/server-kotlin/java/sites/create.md new file mode 100644 index 0000000000..19664ec57b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create.md @@ -0,0 +1,42 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; +import io.appwrite.enums.BuildRuntime; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.create( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + .NODE_14_5, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .STATIC, // adapter (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete-deployment.md new file mode 100644 index 0000000000..97c08ab159 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete-log.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete-log.md new file mode 100644 index 0000000000..d7189373b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete-variable.md new file mode 100644 index 0000000000..4e2b3ab7d4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete.md new file mode 100644 index 0000000000..fd07bb23c8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.delete( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment-download.md new file mode 100644 index 0000000000..5875c7262f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeploymentDownload( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment.md new file mode 100644 index 0000000000..6af859ba9a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-log.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-log.md new file mode 100644 index 0000000000..d33f2a658f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-variable.md new file mode 100644 index 0000000000..1c8df0c08a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get.md b/docs/examples/1.8.x/server-kotlin/java/sites/get.md new file mode 100644 index 0000000000..660cad3bdb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.get( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-deployments.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-deployments.md new file mode 100644 index 0000000000..8bcec54efe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-deployments.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listDeployments( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-frameworks.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-frameworks.md new file mode 100644 index 0000000000..df597177dd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-frameworks.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listFrameworks(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-logs.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-logs.md new file mode 100644 index 0000000000..3532882a8d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listLogs( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-specifications.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-specifications.md new file mode 100644 index 0000000000..caad7325cf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-specifications.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-variables.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-variables.md new file mode 100644 index 0000000000..f2a38b7e60 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-variables.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listVariables( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list.md b/docs/examples/1.8.x/server-kotlin/java/sites/list.md new file mode 100644 index 0000000000..39a1c06407 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/java/sites/update-deployment-status.md new file mode 100644 index 0000000000..8dc3041f76 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update-deployment-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateDeploymentStatus( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update-site-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/update-site-deployment.md new file mode 100644 index 0000000000..edbda7cf93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update-site-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateSiteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/update-variable.md new file mode 100644 index 0000000000..9735ae34af --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update-variable.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update.md b/docs/examples/1.8.x/server-kotlin/java/sites/update.md new file mode 100644 index 0000000000..9a8b577ce0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.update( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .NODE_14_5, // buildRuntime (optional) + .STATIC, // adapter (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md new file mode 100644 index 0000000000..a3a3308420 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.createBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + listOf(), // allowedFileExtensions (optional) + .NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md new file mode 100644 index 0000000000..583f8569a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.createFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + InputFile.fromPath("file.png"), // file + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/delete-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/delete-bucket.md new file mode 100644 index 0000000000..eb77754f92 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/delete-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.deleteBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/delete-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/delete-file.md new file mode 100644 index 0000000000..8976fd198f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/delete-file.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.deleteFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-bucket.md new file mode 100644 index 0000000000..a099f33dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-download.md new file mode 100644 index 0000000000..edda2609b5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFileDownload( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<TOKEN>", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-preview.md new file mode 100644 index 0000000000..1a0ab596bc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-preview.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFilePreview( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.CENTER, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + "", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "", // background (optional) + ImageFormat.JPG, // output (optional) + "<TOKEN>", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-view.md new file mode 100644 index 0000000000..178e50776c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-view.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFileView( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<TOKEN>", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file.md new file mode 100644 index 0000000000..7a04c80e9e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/list-buckets.md b/docs/examples/1.8.x/server-kotlin/java/storage/list-buckets.md new file mode 100644 index 0000000000..9d85957803 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/list-buckets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.listBuckets( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/list-files.md b/docs/examples/1.8.x/server-kotlin/java/storage/list-files.md new file mode 100644 index 0000000000..f002754813 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/list-files.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.listFiles( + "<BUCKET_ID>", // bucketId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md new file mode 100644 index 0000000000..2d80e2648c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.updateBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + listOf(), // allowedFileExtensions (optional) + .NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md new file mode 100644 index 0000000000..7f325f91fb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.updateFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<NAME>", // name (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md new file mode 100644 index 0000000000..2336ee90e0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md new file mode 100644 index 0000000000..dd3df83dbf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md new file mode 100644 index 0000000000..3b130d1ecd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md new file mode 100644 index 0000000000..73c6e1c7de --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md new file mode 100644 index 0000000000..dd6f207ff4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md new file mode 100644 index 0000000000..2a4df003c0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + IndexType.KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md new file mode 100644 index 0000000000..3546ac8174 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md new file mode 100644 index 0000000000..825d8b0c5c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md new file mode 100644 index 0000000000..7a0b50a541 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md new file mode 100644 index 0000000000..7ba3678aad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md new file mode 100644 index 0000000000..c20aa2c11f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md new file mode 100644 index 0000000000..b8cb626601 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md new file mode 100644 index 0000000000..91e90c8bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create.md b/docs/examples/1.8.x/server-kotlin/java/tables/create.md new file mode 100644 index 0000000000..6a9faf06dd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.create( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md new file mode 100644 index 0000000000..9e79f36e14 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md new file mode 100644 index 0000000000..f14390c905 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md new file mode 100644 index 0000000000..1b22eb00d8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md new file mode 100644 index 0000000000..a48745a225 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md new file mode 100644 index 0000000000..6a86321fad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md new file mode 100644 index 0000000000..e777c7292e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.delete( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md new file mode 100644 index 0000000000..b4f7e1298f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md new file mode 100644 index 0000000000..5bcd59d4cd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md new file mode 100644 index 0000000000..7f72c25cd8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get.md b/docs/examples/1.8.x/server-kotlin/java/tables/get.md new file mode 100644 index 0000000000..6f3c639450 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.get( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md new file mode 100644 index 0000000000..f9c828398a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md new file mode 100644 index 0000000000..05e1960021 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md new file mode 100644 index 0000000000..c9bd445fe8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md new file mode 100644 index 0000000000..8cbc356556 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list.md b/docs/examples/1.8.x/server-kotlin/java/tables/list.md new file mode 100644 index 0000000000..c3e0c559aa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.list( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md new file mode 100644 index 0000000000..647190e7bc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md new file mode 100644 index 0000000000..38e0e60da5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md new file mode 100644 index 0000000000..918884e0b3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md new file mode 100644 index 0000000000..b1bbc83520 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md new file mode 100644 index 0000000000..977c23727c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md new file mode 100644 index 0000000000..d2ad81d0eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md new file mode 100644 index 0000000000..cd6e67bc2c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md new file mode 100644 index 0000000000..e0dc185e0e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md new file mode 100644 index 0000000000..8270c3fa9b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md new file mode 100644 index 0000000000..a51878508f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md new file mode 100644 index 0000000000..31e279d068 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md new file mode 100644 index 0000000000..201e578ac6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update.md b/docs/examples/1.8.x/server-kotlin/java/tables/update.md new file mode 100644 index 0000000000..cf560cb461 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.update( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md new file mode 100644 index 0000000000..11127c5bfa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md new file mode 100644 index 0000000000..14b382263b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/create-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/create-membership.md new file mode 100644 index 0000000000..89e9d96ef6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/create-membership.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.createMembership( + "<TEAM_ID>", // teamId + listOf(), // roles + "email@example.com", // email (optional) + "<USER_ID>", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/create.md b/docs/examples/1.8.x/server-kotlin/java/teams/create.md new file mode 100644 index 0000000000..28cc3dada1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.create( + "<TEAM_ID>", // teamId + "<NAME>", // name + listOf(), // roles (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/delete-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/delete-membership.md new file mode 100644 index 0000000000..3b414be028 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/delete-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.deleteMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/delete.md b/docs/examples/1.8.x/server-kotlin/java/teams/delete.md new file mode 100644 index 0000000000..07f5c12e4c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.delete( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/get-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/get-membership.md new file mode 100644 index 0000000000..e7c1571af6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/get-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/get-prefs.md b/docs/examples/1.8.x/server-kotlin/java/teams/get-prefs.md new file mode 100644 index 0000000000..6d30814801 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/get-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getPrefs( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/get.md b/docs/examples/1.8.x/server-kotlin/java/teams/get.md new file mode 100644 index 0000000000..a479e9aff2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.get( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/list-memberships.md b/docs/examples/1.8.x/server-kotlin/java/teams/list-memberships.md new file mode 100644 index 0000000000..9694482008 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/list-memberships.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.listMemberships( + "<TEAM_ID>", // teamId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/list.md b/docs/examples/1.8.x/server-kotlin/java/teams/list.md new file mode 100644 index 0000000000..d0855ba841 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-membership-status.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership-status.md new file mode 100644 index 0000000000..461cf4cbc3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership-status.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership.md new file mode 100644 index 0000000000..d4816c57f1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + listOf(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-name.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-name.md new file mode 100644 index 0000000000..f2f1b02d93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-name.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateName( + "<TEAM_ID>", // teamId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-prefs.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-prefs.md new file mode 100644 index 0000000000..2ef05222df --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-prefs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updatePrefs( + "<TEAM_ID>", // teamId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/create-file-token.md b/docs/examples/1.8.x/server-kotlin/java/tokens/create-file-token.md new file mode 100644 index 0000000000..6996641d40 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/create-file-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.createFileToken( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "", // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/delete.md b/docs/examples/1.8.x/server-kotlin/java/tokens/delete.md new file mode 100644 index 0000000000..bf1874d2f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.delete( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/get.md b/docs/examples/1.8.x/server-kotlin/java/tokens/get.md new file mode 100644 index 0000000000..c55563c2e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.get( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/list.md b/docs/examples/1.8.x/server-kotlin/java/tokens/list.md new file mode 100644 index 0000000000..a59e9f5ee8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.list( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/update.md b/docs/examples/1.8.x/server-kotlin/java/tokens/update.md new file mode 100644 index 0000000000..2a44f2d16e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/update.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.update( + "<TOKEN_ID>", // tokenId + "", // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md new file mode 100644 index 0000000000..c78f236cec --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createArgon2User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-bcrypt-user.md new file mode 100644 index 0000000000..7b85f96054 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-bcrypt-user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createBcryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md new file mode 100644 index 0000000000..2b4d7e9c50 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createJWT( + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId (optional) + 0, // duration (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md new file mode 100644 index 0000000000..666e10792e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createMD5User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..62afec2a1f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..048ba39cca --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createPHPassUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md new file mode 100644 index 0000000000..ad729071c2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createSHAUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + PasswordHash.SHA1, // passwordVersion (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..77a7d5fdb3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-modified-user.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createScryptModifiedUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + "<PASSWORD_SALT_SEPARATOR>", // passwordSaltSeparator + "<PASSWORD_SIGNER_KEY>", // passwordSignerKey + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-user.md new file mode 100644 index 0000000000..0e81237ecf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-user.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createScryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + 0, // passwordCpu + 0, // passwordMemory + 0, // passwordParallel + 0, // passwordLength + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-session.md b/docs/examples/1.8.x/server-kotlin/java/users/create-session.md new file mode 100644 index 0000000000..8d9ce03d8e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createSession( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-target.md b/docs/examples/1.8.x/server-kotlin/java/users/create-target.md new file mode 100644 index 0000000000..6681b170da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-target.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.MessagingProviderType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + MessagingProviderType.EMAIL, // providerType + "<IDENTIFIER>", // identifier + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-token.md b/docs/examples/1.8.x/server-kotlin/java/users/create-token.md new file mode 100644 index 0000000000..330b344b15 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createToken( + "<USER_ID>", // userId + 4, // length (optional) + 60, // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create.md b/docs/examples/1.8.x/server-kotlin/java/users/create.md new file mode 100644 index 0000000000..95a72bf7e0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.create( + "<USER_ID>", // userId + "email@example.com", // email (optional) + "+12065550100", // phone (optional) + "", // password (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-identity.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-identity.md new file mode 100644 index 0000000000..40c410db47 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-identity.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..7ed33d6d82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-mfa-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteMfaAuthenticator( + "<USER_ID>", // userId + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-session.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-session.md new file mode 100644 index 0000000000..0e0a52baf8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-session.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteSession( + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-sessions.md new file mode 100644 index 0000000000..6a3bbbf46f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-sessions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteSessions( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-target.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-target.md new file mode 100644 index 0000000000..e38ee1d57d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete.md b/docs/examples/1.8.x/server-kotlin/java/users/delete.md new file mode 100644 index 0000000000..d207f9af4b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.delete( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..940dafee90 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get-prefs.md b/docs/examples/1.8.x/server-kotlin/java/users/get-prefs.md new file mode 100644 index 0000000000..9ff3e4b308 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getPrefs( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get-target.md b/docs/examples/1.8.x/server-kotlin/java/users/get-target.md new file mode 100644 index 0000000000..05c802835d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get.md b/docs/examples/1.8.x/server-kotlin/java/users/get.md new file mode 100644 index 0000000000..d8cd707c9c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.get( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-identities.md b/docs/examples/1.8.x/server-kotlin/java/users/list-identities.md new file mode 100644 index 0000000000..e0fc9d122a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-identities.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listIdentities( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-logs.md b/docs/examples/1.8.x/server-kotlin/java/users/list-logs.md new file mode 100644 index 0000000000..86c94ee3a4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listLogs( + "<USER_ID>", // userId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-memberships.md b/docs/examples/1.8.x/server-kotlin/java/users/list-memberships.md new file mode 100644 index 0000000000..d0cee13275 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-memberships.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listMemberships( + "<USER_ID>", // userId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/java/users/list-mfa-factors.md new file mode 100644 index 0000000000..a377214d19 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-mfa-factors.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listMfaFactors( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-sessions.md b/docs/examples/1.8.x/server-kotlin/java/users/list-sessions.md new file mode 100644 index 0000000000..7e13cb31c9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-sessions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listSessions( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-targets.md b/docs/examples/1.8.x/server-kotlin/java/users/list-targets.md new file mode 100644 index 0000000000..efa754273f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-targets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listTargets( + "<USER_ID>", // userId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list.md b/docs/examples/1.8.x/server-kotlin/java/users/list.md new file mode 100644 index 0000000000..d587eaf46b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-email-verification.md b/docs/examples/1.8.x/server-kotlin/java/users/update-email-verification.md new file mode 100644 index 0000000000..a79c87b4d6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-email-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateEmailVerification( + "<USER_ID>", // userId + false, // emailVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-email.md b/docs/examples/1.8.x/server-kotlin/java/users/update-email.md new file mode 100644 index 0000000000..24cdb00dff --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-email.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateEmail( + "<USER_ID>", // userId + "email@example.com", // email + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-labels.md b/docs/examples/1.8.x/server-kotlin/java/users/update-labels.md new file mode 100644 index 0000000000..379200a56b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-labels.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateLabels( + "<USER_ID>", // userId + listOf(), // labels + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..439561012f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-mfa.md b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa.md new file mode 100644 index 0000000000..76a198f513 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateMfa( + "<USER_ID>", // userId + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-name.md b/docs/examples/1.8.x/server-kotlin/java/users/update-name.md new file mode 100644 index 0000000000..b4f889cb6d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-name.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateName( + "<USER_ID>", // userId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-password.md b/docs/examples/1.8.x/server-kotlin/java/users/update-password.md new file mode 100644 index 0000000000..94e24da45d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-password.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePassword( + "<USER_ID>", // userId + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/java/users/update-phone-verification.md new file mode 100644 index 0000000000..4a1d5a2900 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-phone-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePhoneVerification( + "<USER_ID>", // userId + false, // phoneVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-phone.md b/docs/examples/1.8.x/server-kotlin/java/users/update-phone.md new file mode 100644 index 0000000000..49477fad43 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-phone.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePhone( + "<USER_ID>", // userId + "+12065550100", // number + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-prefs.md b/docs/examples/1.8.x/server-kotlin/java/users/update-prefs.md new file mode 100644 index 0000000000..c5a9677a20 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-prefs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePrefs( + "<USER_ID>", // userId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-status.md b/docs/examples/1.8.x/server-kotlin/java/users/update-status.md new file mode 100644 index 0000000000..6e875b982f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateStatus( + "<USER_ID>", // userId + false, // status + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-target.md b/docs/examples/1.8.x/server-kotlin/java/users/update-target.md new file mode 100644 index 0000000000..67b90bfbac --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-target.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + "<IDENTIFIER>", // identifier (optional) + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-anonymous-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..0ddc3835dc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createAnonymousSession() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-password-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-password-session.md new file mode 100644 index 0000000000..9c7af95e13 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createEmailPasswordSession( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-token.md new file mode 100644 index 0000000000..84acd78a9c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-token.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createEmailToken( + userId = "<USER_ID>", + email = "email@example.com", + phrase = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..4c04aa1215 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createJWT() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..c1d8cba2cb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createMagicURLToken( + userId = "<USER_ID>", + email = "email@example.com", + url = "https://example.com", // optional + phrase = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..803579da03 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMfaAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-challenge.md new file mode 100644 index 0000000000..a3fbe25d75 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createMfaChallenge( + factor = AuthenticationFactor.EMAIL +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..c21a382fcc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md new file mode 100644 index 0000000000..1a8c1188b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // optional + failure = "https://example.com", // optional + scopes = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-token.md new file mode 100644 index 0000000000..be03e0659f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-token.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createPhoneToken( + userId = "<USER_ID>", + phone = "+12065550100" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..3ae45b3982 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-verification.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createPhoneVerification() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-recovery.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..949219cfca --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-recovery.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-session.md new file mode 100644 index 0000000000..5afb219ff0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-verification.md new file mode 100644 index 0000000000..f3441c9bdd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createVerification( + url = "https://example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create.md new file mode 100644 index 0000000000..80640ba830 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.create( + userId = "<USER_ID>", + email = "email@example.com", + password = "", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-identity.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..f9a5ce0a12 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-identity.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteIdentity( + identityId = "<IDENTITY_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..2068077f46 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteMfaAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-session.md new file mode 100644 index 0000000000..31096ccc65 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..dc29fb8aac --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-sessions.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteSessions() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..027c211230 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..299abbd929 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-prefs.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getPrefs() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-session.md new file mode 100644 index 0000000000..e40297e60c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get.md new file mode 100644 index 0000000000..f65f4fd618 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.get() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-identities.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-identities.md new file mode 100644 index 0000000000..32eb86cb43 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-identities.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listIdentities( + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-logs.md new file mode 100644 index 0000000000..345b2f1f06 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-logs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listLogs( + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-mfa-factors.md new file mode 100644 index 0000000000..ce47dcd752 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listMfaFactors() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..899260cd5b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-sessions.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listSessions() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-email.md new file mode 100644 index 0000000000..6ebe5e7ec9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-email.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateEmail( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md new file mode 100644 index 0000000000..e12e8e00e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMFA( + mfa = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..d4fe7f4861 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.updateMagicURLSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..521d133f6f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaAuthenticator( + type = AuthenticatorType.TOTP, + otp = "<OTP>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-challenge.md new file mode 100644 index 0000000000..6b978b765e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaChallenge( + challengeId = "<CHALLENGE_ID>", + otp = "<OTP>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..31da824bbf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-name.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-name.md new file mode 100644 index 0000000000..ecb7a2bd2f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateName( + name = "<NAME>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-password.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-password.md new file mode 100644 index 0000000000..159aa79aef --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-password.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePassword( + password = "", + oldPassword = "password" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-session.md new file mode 100644 index 0000000000..1bcc4c0955 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.updatePhoneSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..36a2d9c73b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePhoneVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone.md new file mode 100644 index 0000000000..1ee4cbd39b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePhone( + phone = "+12065550100", + password = "password" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..dafee7c0e5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePrefs( + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-recovery.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..e56381365d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-recovery.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateRecovery( + userId = "<USER_ID>", + secret = "<SECRET>", + password = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-session.md new file mode 100644 index 0000000000..ab3730af0e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-status.md new file mode 100644 index 0000000000..021f6143c0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-status.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateStatus() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-verification.md new file mode 100644 index 0000000000..6402093410 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-browser.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..f289205ab0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-browser.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-credit-card.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..1fd00a24bd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-favicon.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..d1f5d9bfe6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-favicon.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-flag.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..a16aefcffd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-flag.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-image.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..98b9c07e7f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-image.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", + width = 0, // optional + height = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-initials.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..2aa165ccf8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-initials.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getInitials( + name = "<NAME>", // optional + width = 0, // optional + height = 0, // optional + background = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..abcf488cbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "<TEXT>", + size = 1, // optional + margin = 0, // optional + download = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..b80bd9497a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md new file mode 100644 index 0000000000..de9679f559 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + documentSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..2d730562a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md new file mode 100644 index 0000000000..93da01eefa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val databases = Databases(client) + +val response = databases.createDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md new file mode 100644 index 0000000000..ddce31c71c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-email-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-email-attribute.md new file mode 100644 index 0000000000..2a5a9c2a60 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d9decdeba9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-float-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-float-attribute.md new file mode 100644 index 0000000000..5ca86a66af --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-index.md new file mode 100644 index 0000000000..da777ac906 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + type = IndexType.KEY, + attributes = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-integer-attribute.md new file mode 100644 index 0000000000..748d01a849 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-ip-attribute.md new file mode 100644 index 0000000000..bfc610517a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..1bf610321a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + relatedCollectionId = "<RELATED_COLLECTION_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-string-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-string-attribute.md new file mode 100644 index 0000000000..333cb76763 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-url-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-url-attribute.md new file mode 100644 index 0000000000..06057d4683 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create.md new file mode 100644 index 0000000000..04c64801d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..05204d76c6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.decrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-attribute.md new file mode 100644 index 0000000000..9a25155957 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-collection.md new file mode 100644 index 0000000000..c46ca086b9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..a9eea6b648 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.deleteDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-documents.md new file mode 100644 index 0000000000..c4caa63aae --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-index.md new file mode 100644 index 0000000000..37c75dcfe5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete.md new file mode 100644 index 0000000000..07225698e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.delete( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-attribute.md new file mode 100644 index 0000000000..a59facd7db --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-collection.md new file mode 100644 index 0000000000..7f6e578db1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-document.md new file mode 100644 index 0000000000..d21a19869b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.getDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-index.md new file mode 100644 index 0000000000..39ac7af9fb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get.md new file mode 100644 index 0000000000..6ebb0c109c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.get( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md new file mode 100644 index 0000000000..40c1224ae7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.incrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-attributes.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-attributes.md new file mode 100644 index 0000000000..5ddb0a6fea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-attributes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listAttributes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-collections.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-collections.md new file mode 100644 index 0000000000..5340903927 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-collections.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listCollections( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..ed9cb3165d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.listDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-indexes.md new file mode 100644 index 0000000000..2ab2e6a1b2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listIndexes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list.md new file mode 100644 index 0000000000..cd61a0e714 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..4c9fd91d83 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md new file mode 100644 index 0000000000..bd42ba07f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + documentSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..082ae1c05a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md new file mode 100644 index 0000000000..4dd0349823 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.updateDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-documents.md new file mode 100644 index 0000000000..9d6c2b5ea8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-documents.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-email-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-email-attribute.md new file mode 100644 index 0000000000..026bd6447f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-enum-attribute.md new file mode 100644 index 0000000000..e68a29c20a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-float-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-float-attribute.md new file mode 100644 index 0000000000..58b110743e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-integer-attribute.md new file mode 100644 index 0000000000..a00dcf95a0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-ip-attribute.md new file mode 100644 index 0000000000..505e5ea18d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..001dd1a391 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-string-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-string-attribute.md new file mode 100644 index 0000000000..364a6b5b7f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-url-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-url-attribute.md new file mode 100644 index 0000000000..a628cc57f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update.md new file mode 100644 index 0000000000..05f832738a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md new file mode 100644 index 0000000000..df261dbcb6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val databases = Databases(client) + +val response = databases.upsertDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md new file mode 100644 index 0000000000..1cb376f107 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.upsertDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-deployment.md new file mode 100644 index 0000000000..ddc6e8b207 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createDeployment( + functionId = "<FUNCTION_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..a3395f118f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createDuplicateDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + buildId = "<BUILD_ID>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..94bfa2310c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.createExecution( + functionId = "<FUNCTION_ID>", + body = "<BODY>", // optional + async = false, // optional + path = "<PATH>", // optional + method = "GET", // optional + headers = mapOf( "a" to "b" ), // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-template-deployment.md new file mode 100644 index 0000000000..90c311ec7a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createTemplateDeployment( + functionId = "<FUNCTION_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-variable.md new file mode 100644 index 0000000000..061bc20534 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-variable.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVariable( + functionId = "<FUNCTION_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..08bb5a3097 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVcsDeployment( + functionId = "<FUNCTION_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create.md new file mode 100644 index 0000000000..c0ea4de201 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.Runtime + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.create( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = .NODE_14_5, + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-deployment.md new file mode 100644 index 0000000000..937fc961da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-execution.md new file mode 100644 index 0000000000..95994f822a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-execution.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-variable.md new file mode 100644 index 0000000000..e1793675c9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete.md new file mode 100644 index 0000000000..9651744767 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.delete( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment-download.md new file mode 100644 index 0000000000..634cfae3b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val result = functions.getDeploymentDownload( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment.md new file mode 100644 index 0000000000..eba4abb6df --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.getDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..480dbb76ba --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-execution.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.getExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-variable.md new file mode 100644 index 0000000000..95359ef8fc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.getVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get.md new file mode 100644 index 0000000000..162fa22497 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.get( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-deployments.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-deployments.md new file mode 100644 index 0000000000..9318442afa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-deployments.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listDeployments( + functionId = "<FUNCTION_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-executions.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..926719cda8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-executions.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.listExecutions( + functionId = "<FUNCTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-runtimes.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-runtimes.md new file mode 100644 index 0000000000..5b3673b84d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-runtimes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listRuntimes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-specifications.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-specifications.md new file mode 100644 index 0000000000..0b2fb46a4b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-specifications.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listSpecifications() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-variables.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-variables.md new file mode 100644 index 0000000000..7f576e8957 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-variables.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listVariables( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list.md new file mode 100644 index 0000000000..b10fdff53a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-deployment-status.md new file mode 100644 index 0000000000..0e6e9c0abe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateDeploymentStatus( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-function-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-function-deployment.md new file mode 100644 index 0000000000..a975e07efe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateFunctionDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-variable.md new file mode 100644 index 0000000000..106b340eb5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-variable.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", // optional + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update.md new file mode 100644 index 0000000000..7f0b33ebd7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update.md @@ -0,0 +1,31 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.update( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = "node-14.5", // optional + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/graphql/mutation.md b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..98081ab06b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/mutation.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.mutation( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/graphql/query.md b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/query.md new file mode 100644 index 0000000000..dec8dd350c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/query.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.query( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-antivirus.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-antivirus.md new file mode 100644 index 0000000000..869b4c4804 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-antivirus.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getAntivirus() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-cache.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-cache.md new file mode 100644 index 0000000000..8b72ec414f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-cache.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getCache() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-certificate.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-certificate.md new file mode 100644 index 0000000000..74bf618704 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-certificate.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getCertificate( + domain = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md new file mode 100644 index 0000000000..a55a1146f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getDB() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-failed-jobs.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-failed-jobs.md new file mode 100644 index 0000000000..027df127cc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health +import io.appwrite.enums.Name + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getFailedJobs( + name = .V1_DATABASE, + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-pub-sub.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-pub-sub.md new file mode 100644 index 0000000000..53c3820232 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-pub-sub.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getPubSub() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-builds.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-builds.md new file mode 100644 index 0000000000..371aad90f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-builds.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueBuilds( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-certificates.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-certificates.md new file mode 100644 index 0000000000..5c6adeecb5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueCertificates( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-databases.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-databases.md new file mode 100644 index 0000000000..3a3405830d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-databases.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueDatabases( + name = "<NAME>", // optional + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-deletes.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-deletes.md new file mode 100644 index 0000000000..5d0b8a3381 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueDeletes( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-functions.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-functions.md new file mode 100644 index 0000000000..7a42b61ba5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-functions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueFunctions( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-logs.md new file mode 100644 index 0000000000..151025bfb6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-logs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueLogs( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-mails.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-mails.md new file mode 100644 index 0000000000..f5a905dd73 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-mails.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMails( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-messaging.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-messaging.md new file mode 100644 index 0000000000..4a837928eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMessaging( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-migrations.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-migrations.md new file mode 100644 index 0000000000..853d294ed1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMigrations( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..6a76f528e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueStatsResources( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-usage.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-usage.md new file mode 100644 index 0000000000..e344b9eddc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-usage.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueUsage( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-webhooks.md new file mode 100644 index 0000000000..f5ffc58d8d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueWebhooks( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage-local.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage-local.md new file mode 100644 index 0000000000..32a21aea0a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage-local.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getStorageLocal() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage.md new file mode 100644 index 0000000000..8af609aad9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getStorage() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-time.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-time.md new file mode 100644 index 0000000000..8054ed7c69 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-time.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getTime() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get.md new file mode 100644 index 0000000000..0845320bb5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.get() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/get.md new file mode 100644 index 0000000000..6840259c27 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.get() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..fd0c4e413e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-continents.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..699d599f56 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-continents.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listContinents() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..13e86f3064 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountriesEU() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-phones.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..b660ccf433 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountriesPhones() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..3457ceb4c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountries() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-currencies.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..80b2cc7e52 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-currencies.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCurrencies() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-languages.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..b36c1389a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-languages.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listLanguages() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-apns-provider.md new file mode 100644 index 0000000000..a19cbe2725 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createApnsProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-email.md new file mode 100644 index 0000000000..f0f41e9e53 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-email.md @@ -0,0 +1,25 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createEmail( + messageId = "<MESSAGE_ID>", + subject = "<SUBJECT>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + cc = listOf(), // optional + bcc = listOf(), // optional + attachments = listOf(), // optional + draft = false, // optional + html = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..c1a077ca5c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createFcmProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + serviceAccountJSON = mapOf( "a" to "b" ), // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..d205171dfe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional + isEuRegion = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md new file mode 100644 index 0000000000..5ea3d223e9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-push.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-push.md new file mode 100644 index 0000000000..5b07f5355b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-push.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createPush( + messageId = "<MESSAGE_ID>", + title = "<TITLE>", // optional + body = "<BODY>", // optional + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + data = mapOf( "a" to "b" ), // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 0, // optional + draft = false, // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..e96a052d5a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sms.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sms.md new file mode 100644 index 0000000000..49185290c3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sms.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSms( + messageId = "<MESSAGE_ID>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..ae3b6678e4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSmtpProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + host = "<HOST>", + port = 1, // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-subscriber.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-subscriber.md new file mode 100644 index 0000000000..44e3a72a1d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.createSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..cddd6d801a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..12eb62d957 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-topic.md new file mode 100644 index 0000000000..570be33e41 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-topic.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", + subscribe = listOf("any") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..c05b835d52 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..7e049d8313 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-provider.md new file mode 100644 index 0000000000..4989da8cd3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-provider.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.deleteProvider( + providerId = "<PROVIDER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-subscriber.md new file mode 100644 index 0000000000..0f99f251a3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.deleteSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-topic.md new file mode 100644 index 0000000000..8a52c9f9a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-topic.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.deleteTopic( + topicId = "<TOPIC_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete.md new file mode 100644 index 0000000000..7e4ec51c93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.delete( + messageId = "<MESSAGE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-message.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-message.md new file mode 100644 index 0000000000..710d356113 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-message.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getMessage( + messageId = "<MESSAGE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-provider.md new file mode 100644 index 0000000000..c678d4d984 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-provider.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getProvider( + providerId = "<PROVIDER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-subscriber.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-subscriber.md new file mode 100644 index 0000000000..59b335a2e6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-topic.md new file mode 100644 index 0000000000..c189898e95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-topic.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getTopic( + topicId = "<TOPIC_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-message-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-message-logs.md new file mode 100644 index 0000000000..e1463f8911 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listMessageLogs( + messageId = "<MESSAGE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-messages.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-messages.md new file mode 100644 index 0000000000..618f8c493e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-messages.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listMessages( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-provider-logs.md new file mode 100644 index 0000000000..ab0a9f1260 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listProviderLogs( + providerId = "<PROVIDER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-providers.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-providers.md new file mode 100644 index 0000000000..34c70a9c86 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-providers.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listProviders( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..8a82af8f70 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listSubscriberLogs( + subscriberId = "<SUBSCRIBER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscribers.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscribers.md new file mode 100644 index 0000000000..acf5249900 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listSubscribers( + topicId = "<TOPIC_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-targets.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-targets.md new file mode 100644 index 0000000000..ad500f0e38 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-targets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTargets( + messageId = "<MESSAGE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topic-logs.md new file mode 100644 index 0000000000..683b418032 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTopicLogs( + topicId = "<TOPIC_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topics.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topics.md new file mode 100644 index 0000000000..125c6ffb82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topics.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTopics( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-apns-provider.md new file mode 100644 index 0000000000..d0d5a07848 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateApnsProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-email.md new file mode 100644 index 0000000000..cd74bb4290 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-email.md @@ -0,0 +1,25 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateEmail( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + subject = "<SUBJECT>", // optional + content = "<CONTENT>", // optional + draft = false, // optional + html = false, // optional + cc = listOf(), // optional + bcc = listOf(), // optional + scheduledAt = "", // optional + attachments = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..477e7188d8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateFcmProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + serviceAccountJSON = mapOf( "a" to "b" ) // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..4bec8d2a44 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional + isEuRegion = false, // optional + enabled = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md new file mode 100644 index 0000000000..3abaca75bb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-push.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-push.md new file mode 100644 index 0000000000..710a37e518 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-push.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updatePush( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + title = "<TITLE>", // optional + body = "<BODY>", // optional + data = mapOf( "a" to "b" ), // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 0, // optional + draft = false, // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..962aa694e6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sms.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sms.md new file mode 100644 index 0000000000..3d08b8a16c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sms.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSms( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + content = "<CONTENT>", // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..cb745865ec --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSmtpProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + host = "<HOST>", // optional + port = 1, // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..83fb11a856 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..1e2ee1e2c8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-topic.md new file mode 100644 index 0000000000..0991fd0ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-topic.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", // optional + subscribe = listOf("any") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..1c86f9e853 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..bf0ee2b75c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-deployment.md new file mode 100644 index 0000000000..ba2c24dd6b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-deployment.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDeployment( + siteId = "<SITE_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..06a3ce8467 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDuplicateDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-template-deployment.md new file mode 100644 index 0000000000..bf246be089 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createTemplateDeployment( + siteId = "<SITE_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-variable.md new file mode 100644 index 0000000000..6eb466682f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-variable.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVariable( + siteId = "<SITE_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..141cf3e658 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVcsDeployment( + siteId = "<SITE_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create.md new file mode 100644 index 0000000000..a5e9719faf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework +import io.appwrite.enums.BuildRuntime + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.create( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + buildRuntime = .NODE_14_5, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + adapter = "static", // optional + installationId = "<INSTALLATION_ID>", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-deployment.md new file mode 100644 index 0000000000..6d739183f1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-log.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-log.md new file mode 100644 index 0000000000..c7d7b77824 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-variable.md new file mode 100644 index 0000000000..7859a8a852 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete.md new file mode 100644 index 0000000000..369b6144c3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.delete( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment-download.md new file mode 100644 index 0000000000..84324762cc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val result = sites.getDeploymentDownload( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment.md new file mode 100644 index 0000000000..f2a33a409e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-log.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-log.md new file mode 100644 index 0000000000..ff46f77d12 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-variable.md new file mode 100644 index 0000000000..ccab666607 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get.md new file mode 100644 index 0000000000..7ced974ede --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.get( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-deployments.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-deployments.md new file mode 100644 index 0000000000..6bc29ccd0e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-deployments.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listDeployments( + siteId = "<SITE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-frameworks.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-frameworks.md new file mode 100644 index 0000000000..cf02b75bc2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-frameworks.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listFrameworks() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-logs.md new file mode 100644 index 0000000000..d7979ded39 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listLogs( + siteId = "<SITE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-specifications.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-specifications.md new file mode 100644 index 0000000000..56e864059a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-specifications.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listSpecifications() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-variables.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-variables.md new file mode 100644 index 0000000000..70ec49799b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-variables.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listVariables( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list.md new file mode 100644 index 0000000000..26e965177d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-deployment-status.md new file mode 100644 index 0000000000..585fc324ed --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateDeploymentStatus( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-site-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-site-deployment.md new file mode 100644 index 0000000000..fb9bb726f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateSiteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-variable.md new file mode 100644 index 0000000000..b32c27809a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-variable.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", // optional + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update.md new file mode 100644 index 0000000000..4b4a938d95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.update( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + buildRuntime = "node-14.5", // optional + adapter = "static", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md new file mode 100644 index 0000000000..0bca827872 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.createBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = "none", // optional + encryption = false, // optional + antivirus = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md new file mode 100644 index 0000000000..b22b32a665 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.createFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + file = InputFile.fromPath("file.png"), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-bucket.md new file mode 100644 index 0000000000..4a0904ec63 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.deleteBucket( + bucketId = "<BUCKET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..cf5e285db3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-file.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.deleteFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-bucket.md new file mode 100644 index 0000000000..e2a6a8f527 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.getBucket( + bucketId = "<BUCKET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-download.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..c14c966b8b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + token = "<TOKEN>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-preview.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..45122de2f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + width = 0, // optional + height = 0, // optional + gravity = "center", // optional + quality = -1, // optional + borderWidth = 0, // optional + borderColor = "", // optional + borderRadius = 0, // optional + opacity = 0, // optional + rotation = -360, // optional + background = "", // optional + output = "jpg", // optional + token = "<TOKEN>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-view.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..fec1ec7162 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-view.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + token = "<TOKEN>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file.md new file mode 100644 index 0000000000..a807177dce --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.getFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-buckets.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-buckets.md new file mode 100644 index 0000000000..a8a066dc9f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-buckets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.listBuckets( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-files.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-files.md new file mode 100644 index 0000000000..cb9a776775 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-files.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.listFiles( + bucketId = "<BUCKET_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md new file mode 100644 index 0000000000..d475a6e5ed --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.updateBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = "none", // optional + encryption = false, // optional + antivirus = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md new file mode 100644 index 0000000000..e82ea8125c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.updateFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + name = "<NAME>", // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md new file mode 100644 index 0000000000..68b8dc51bd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md new file mode 100644 index 0000000000..8740a71d3c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md new file mode 100644 index 0000000000..34a6cb669f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md new file mode 100644 index 0000000000..d3d2fc9286 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md new file mode 100644 index 0000000000..8540430cea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md new file mode 100644 index 0000000000..053c88a93a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + type = IndexType.KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md new file mode 100644 index 0000000000..1222746259 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md new file mode 100644 index 0000000000..277c756d24 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md new file mode 100644 index 0000000000..aa07fac6a8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md new file mode 100644 index 0000000000..5df0890f99 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md new file mode 100644 index 0000000000..f549d6fb8c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md new file mode 100644 index 0000000000..d82026c31d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md new file mode 100644 index 0000000000..42f50e9ec9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md new file mode 100644 index 0000000000..3dc1d1a37d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.create( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md new file mode 100644 index 0000000000..f78f7bbed7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md new file mode 100644 index 0000000000..d41f2ceabf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md new file mode 100644 index 0000000000..7af6648f2f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md new file mode 100644 index 0000000000..d182ccff95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md new file mode 100644 index 0000000000..54ff6b690c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md new file mode 100644 index 0000000000..5cbd03226a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.delete( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md new file mode 100644 index 0000000000..6f4d65b4dc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md new file mode 100644 index 0000000000..660502f228 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md new file mode 100644 index 0000000000..cbaaa6c3e9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md new file mode 100644 index 0000000000..ff6d354c15 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.get( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md new file mode 100644 index 0000000000..7917b7f939 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md new file mode 100644 index 0000000000..4c1765193d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md new file mode 100644 index 0000000000..bcd1fe75ab --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md new file mode 100644 index 0000000000..38b776acb8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md new file mode 100644 index 0000000000..37b03445da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.list( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md new file mode 100644 index 0000000000..10a0422d2d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md new file mode 100644 index 0000000000..69ccf0354e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md new file mode 100644 index 0000000000..593a89b4ce --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md new file mode 100644 index 0000000000..b672e3e155 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md new file mode 100644 index 0000000000..005c4e64a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md new file mode 100644 index 0000000000..39da19d562 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md new file mode 100644 index 0000000000..40e54bcdfd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md new file mode 100644 index 0000000000..d4c36e8802 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md new file mode 100644 index 0000000000..6d3d9a47f7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md new file mode 100644 index 0000000000..aac87c19b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md new file mode 100644 index 0000000000..bb5b1f4bcf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md new file mode 100644 index 0000000000..07f43e3907 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md new file mode 100644 index 0000000000..381532316d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.update( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md new file mode 100644 index 0000000000..6e02b3abe9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md new file mode 100644 index 0000000000..d639e3d30b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/create-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..33eb16568e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create-membership.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.createMembership( + teamId = "<TEAM_ID>", + roles = listOf(), + email = "email@example.com", // optional + userId = "<USER_ID>", // optional + phone = "+12065550100", // optional + url = "https://example.com", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create.md new file mode 100644 index 0000000000..6ec7e533d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.create( + teamId = "<TEAM_ID>", + name = "<NAME>", + roles = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..48c924f37b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.deleteMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete.md new file mode 100644 index 0000000000..4b70ff2f18 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.delete( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..a636c217da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..2b73432d6c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getPrefs( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get.md new file mode 100644 index 0000000000..72b667776f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.get( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/list-memberships.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..287087394e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list-memberships.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.listMemberships( + teamId = "<TEAM_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list.md new file mode 100644 index 0000000000..ee3e3e43b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..b7a0d51ec5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership-status.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateMembershipStatus( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..7a4377fb4d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + roles = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-name.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-name.md new file mode 100644 index 0000000000..2f13d7c460 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-name.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateName( + teamId = "<TEAM_ID>", + name = "<NAME>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..62c7f01ca5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updatePrefs( + teamId = "<TEAM_ID>", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/create-file-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/create-file-token.md new file mode 100644 index 0000000000..63d8fc301b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.createFileToken( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + expire = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/delete.md new file mode 100644 index 0000000000..1831bc6a87 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.delete( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/get.md new file mode 100644 index 0000000000..70a47c2349 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.get( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/list.md new file mode 100644 index 0000000000..697579065c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.list( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/update.md new file mode 100644 index 0000000000..045ddaae4a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/update.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.update( + tokenId = "<TOKEN_ID>", + expire = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md new file mode 100644 index 0000000000..27008a0415 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createArgon2User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-bcrypt-user.md new file mode 100644 index 0000000000..c7231307cf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createBcryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md new file mode 100644 index 0000000000..a556a901c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createJWT( + userId = "<USER_ID>", + sessionId = "<SESSION_ID>", // optional + duration = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md new file mode 100644 index 0000000000..27b985920c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createMD5User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2d1dbf0a1d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..5441e49e6c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createPHPassUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md new file mode 100644 index 0000000000..17a157b2cd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createSHAUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordVersion = "sha1", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..814883cae5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createScryptModifiedUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordSaltSeparator = "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey = "<PASSWORD_SIGNER_KEY>", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-user.md new file mode 100644 index 0000000000..619525a799 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createScryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordCpu = 0, + passwordMemory = 0, + passwordParallel = 0, + passwordLength = 0, + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-session.md new file mode 100644 index 0000000000..a67e605121 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createSession( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-target.md new file mode 100644 index 0000000000..139c6ff049 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-target.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.MessagingProviderType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + providerType = MessagingProviderType.EMAIL, + identifier = "<IDENTIFIER>", + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-token.md new file mode 100644 index 0000000000..43492f4747 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createToken( + userId = "<USER_ID>", + length = 4, // optional + expire = 60 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create.md new file mode 100644 index 0000000000..27ae85ae6e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.create( + userId = "<USER_ID>", + email = "email@example.com", // optional + phone = "+12065550100", // optional + password = "", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-identity.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-identity.md new file mode 100644 index 0000000000..37b4ed2e71 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-identity.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteIdentity( + identityId = "<IDENTITY_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..22085b2f72 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteMfaAuthenticator( + userId = "<USER_ID>", + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-session.md new file mode 100644 index 0000000000..e9e3c7c55e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-session.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteSession( + userId = "<USER_ID>", + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-sessions.md new file mode 100644 index 0000000000..6288e1bc04 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-sessions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteSessions( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-target.md new file mode 100644 index 0000000000..f93be0677a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete.md new file mode 100644 index 0000000000..b938ac70d1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.delete( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e0c45dc258 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-prefs.md new file mode 100644 index 0000000000..927a4a43a1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getPrefs( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-target.md new file mode 100644 index 0000000000..556349c684 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get.md new file mode 100644 index 0000000000..70f0ee9d5f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.get( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-identities.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-identities.md new file mode 100644 index 0000000000..1ac0e5b887 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-identities.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listIdentities( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-logs.md new file mode 100644 index 0000000000..a263293a7a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listLogs( + userId = "<USER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-memberships.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-memberships.md new file mode 100644 index 0000000000..7df13df4e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-memberships.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listMemberships( + userId = "<USER_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-mfa-factors.md new file mode 100644 index 0000000000..4eb6721ce5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listMfaFactors( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-sessions.md new file mode 100644 index 0000000000..4ff34dd53e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-sessions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listSessions( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-targets.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-targets.md new file mode 100644 index 0000000000..0824acfd9e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-targets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listTargets( + userId = "<USER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list.md new file mode 100644 index 0000000000..23dd217a6c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email-verification.md new file mode 100644 index 0000000000..ebf2232f3e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateEmailVerification( + userId = "<USER_ID>", + emailVerification = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email.md new file mode 100644 index 0000000000..a617705dbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateEmail( + userId = "<USER_ID>", + email = "email@example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-labels.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-labels.md new file mode 100644 index 0000000000..86f536f728 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-labels.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateLabels( + userId = "<USER_ID>", + labels = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..74602c0f7e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa.md new file mode 100644 index 0000000000..0148d582b8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateMfa( + userId = "<USER_ID>", + mfa = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-name.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-name.md new file mode 100644 index 0000000000..fedfce36bd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-name.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateName( + userId = "<USER_ID>", + name = "<NAME>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-password.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-password.md new file mode 100644 index 0000000000..4a0ad576e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-password.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePassword( + userId = "<USER_ID>", + password = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone-verification.md new file mode 100644 index 0000000000..6520ef4c95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePhoneVerification( + userId = "<USER_ID>", + phoneVerification = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone.md new file mode 100644 index 0000000000..7261f95db5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePhone( + userId = "<USER_ID>", + number = "+12065550100" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-prefs.md new file mode 100644 index 0000000000..451f4ff4c6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePrefs( + userId = "<USER_ID>", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-status.md new file mode 100644 index 0000000000..a69ae30dbc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateStatus( + userId = "<USER_ID>", + status = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-target.md new file mode 100644 index 0000000000..a18fc63bcb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-target.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + identifier = "<IDENTIFIER>", // optional + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..d8590b03cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..6c940f5435 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md new file mode 100644 index 0000000000..b6be71d45c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createEmailToken( + '<USER_ID>', // userId + 'email@example.com', // email + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..2273646635 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createJWT(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..6dbdc3d9fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createMagicURLToken( + '<USER_ID>', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..e52658b533 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMfaAuthenticator( + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..79d5e89eed --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createMfaChallenge( + sdk.AuthenticationFactor.Email // factor +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..42b3c8c6f5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..adae095105 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createOAuth2Token( + sdk.OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md new file mode 100644 index 0000000000..aca0bd2d8a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createPhoneToken( + '<USER_ID>', // userId + '+12065550100' // phone +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..f7c87f0675 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md new file mode 100644 index 0000000000..660942affb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md new file mode 100644 index 0000000000..8c6b910089 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md new file mode 100644 index 0000000000..1f1db27e8a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create.md b/docs/examples/1.8.x/server-nodejs/examples/account/create.md new file mode 100644 index 0000000000..85e3d2fcca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.create( + '<USER_ID>', // userId + 'email@example.com', // email + '', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md new file mode 100644 index 0000000000..0424ab247e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..5979c3a6d7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteMfaAuthenticator( + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md new file mode 100644 index 0000000000..4276ccad24 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..884c0e0ebc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteSessions(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..27f902424e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/account/get-prefs.md new file mode 100644 index 0000000000..d0d7d31aaf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getPrefs(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md new file mode 100644 index 0000000000..63b6f0893a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get.md b/docs/examples/1.8.x/server-nodejs/examples/account/get.md new file mode 100644 index 0000000000..6ebb605ae8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.get(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md new file mode 100644 index 0000000000..c49894c8c0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md new file mode 100644 index 0000000000..4260a72e30 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..a993e31aa8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-sessions.md new file mode 100644 index 0000000000..33fb527415 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listSessions(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md new file mode 100644 index 0000000000..6111f0e52a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..58629cda3b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMFA( + false // mfa +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3e059d88d9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.updateMagicURLSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..7b24dc8712 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaAuthenticator( + sdk.AuthenticatorType.Totp, // type + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..4d30999129 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaChallenge( + '<CHALLENGE_ID>', // challengeId + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..9db82175c9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md new file mode 100644 index 0000000000..f47d215288 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateName( + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md new file mode 100644 index 0000000000..aa9d67aede --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md new file mode 100644 index 0000000000..c208714a37 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.updatePhoneSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..116d171c92 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePhoneVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md new file mode 100644 index 0000000000..c6c02fde9a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md new file mode 100644 index 0000000000..ee8b042693 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePrefs( + {} // prefs +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md new file mode 100644 index 0000000000..bd4a87c3a9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateRecovery( + '<USER_ID>', // userId + '<SECRET>', // secret + '' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md new file mode 100644 index 0000000000..be80c85750 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-status.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-status.md new file mode 100644 index 0000000000..1b70af5378 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-status.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateStatus(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md new file mode 100644 index 0000000000..0abb562a95 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..1cc825d917 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getBrowser( + sdk.Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..7d62a96033 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getCreditCard( + sdk.CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6056354e9e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFavicon( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..a62f56dd47 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFlag( + sdk.Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md new file mode 100644 index 0000000000..7dac2423ba --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..2cd45bfac8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getInitials( + '<NAME>', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..cfd649ea33 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getQR( + '<TEXT>', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..b6239698a5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md new file mode 100644 index 0000000000..fc5c798385 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..4c7328ce4b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md new file mode 100644 index 0000000000..44cfc3c199 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new sdk.Databases(client); + +const result = await databases.createDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md new file mode 100644 index 0000000000..7ecaa6bef4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // documents +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..47b27508cd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..61c1d77f2c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..3e605001e6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md new file mode 100644 index 0000000000..ed03322cbd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + sdk.IndexType.Key, // type + [], // attributes + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..ce62624001 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..e3bbffe227 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..bb77bc00c3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<RELATED_COLLECTION_ID>', // relatedCollectionId + sdk.RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk.RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..94793e86db --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..6b6b1daaa0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md new file mode 100644 index 0000000000..c1fd4eca43 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.create( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..6bfc5f17cd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.decrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8291fc095e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md new file mode 100644 index 0000000000..9551c558fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md new file mode 100644 index 0000000000..526f00eb3a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.deleteDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md new file mode 100644 index 0000000000..01814e5052 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md new file mode 100644 index 0000000000..90353ea44e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md new file mode 100644 index 0000000000..65179d2b2a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.delete( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md new file mode 100644 index 0000000000..8757265edb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md new file mode 100644 index 0000000000..79c5674985 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md new file mode 100644 index 0000000000..eee515bf36 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.getDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md new file mode 100644 index 0000000000..a4b3a45eb8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get.md new file mode 100644 index 0000000000..a8e8084673 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.get( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..0ba024514a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.incrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e7b48fb9f0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listAttributes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md new file mode 100644 index 0000000000..bc31eadf9b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listCollections( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md new file mode 100644 index 0000000000..d2514850d8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.listDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md new file mode 100644 index 0000000000..86c6c26ec6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listIndexes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list.md new file mode 100644 index 0000000000..06fe6a8462 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..d0d551c3fd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md new file mode 100644 index 0000000000..2618fc735e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..d2378f93ca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md new file mode 100644 index 0000000000..96468037e7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.updateDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md new file mode 100644 index 0000000000..62b2271bae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8b7afbebb5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..f328132519 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..abb93c28fa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..e126f31fd8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..1c8ac79dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..1a7a26cc92 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + sdk.RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..0e0656ef10 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..4a2aca0fe9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md new file mode 100644 index 0000000000..9c69bfd2ce --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.update( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md new file mode 100644 index 0000000000..7f2ffba3a3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new sdk.Databases(client); + +const result = await databases.upsertDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..52f7b55e11 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.upsertDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md new file mode 100644 index 0000000000..5ede954907 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createDeployment( + '<FUNCTION_ID>', // functionId + InputFile.fromPath('/path/to/file', 'filename'), // code + false, // activate + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>' // commands (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..33f77ffd39 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createDuplicateDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + '<BUILD_ID>' // buildId (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md new file mode 100644 index 0000000000..3c89030ca6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.createExecution( + '<FUNCTION_ID>', // functionId + '<BODY>', // body (optional) + false, // async (optional) + '<PATH>', // path (optional) + sdk.ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..eef7148f94 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createTemplateDeployment( + '<FUNCTION_ID>', // functionId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md new file mode 100644 index 0000000000..5e75d19bf4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createVariable( + '<FUNCTION_ID>', // functionId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..ba1067f579 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createVcsDeployment( + '<FUNCTION_ID>', // functionId + sdk.VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create.md new file mode 100644 index 0000000000..646e2e5b4d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.create( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + sdk..Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..f6768ec739 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md new file mode 100644 index 0000000000..c3e77a6860 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md new file mode 100644 index 0000000000..7840b1d562 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md new file mode 100644 index 0000000000..a2e0a23a2b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.delete( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..5ba1035392 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getDeploymentDownload( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + sdk.DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md new file mode 100644 index 0000000000..6a55534af4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md new file mode 100644 index 0000000000..b9fed55799 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.getExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md new file mode 100644 index 0000000000..3b6135f7dc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get.md new file mode 100644 index 0000000000..b88609252e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.get( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md new file mode 100644 index 0000000000..731d1c46cf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listDeployments( + '<FUNCTION_ID>', // functionId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md new file mode 100644 index 0000000000..24d3e54ef3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.listExecutions( + '<FUNCTION_ID>', // functionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a0f83b2273 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listRuntimes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-specifications.md new file mode 100644 index 0000000000..f918c44053 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listSpecifications(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md new file mode 100644 index 0000000000..4220918fa6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listVariables( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list.md new file mode 100644 index 0000000000..af5082c25e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..e7ce4a815c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateDeploymentStatus( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..feef831e5c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateFunctionDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md new file mode 100644 index 0000000000..d9a7ac7e0b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md new file mode 100644 index 0000000000..b6de177cff --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.update( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + sdk..Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md new file mode 100644 index 0000000000..8031a5285a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new sdk.Graphql(client); + +const result = await graphql.mutation( + {} // query +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md b/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md new file mode 100644 index 0000000000..15456754cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new sdk.Graphql(client); + +const result = await graphql.query( + {} // query +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-antivirus.md new file mode 100644 index 0000000000..9efa2d803c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getAntivirus(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-cache.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-cache.md new file mode 100644 index 0000000000..014340123d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-cache.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getCache(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md new file mode 100644 index 0000000000..ec9129344c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getCertificate( + '' // domain (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md new file mode 100644 index 0000000000..0d86d08d1c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getDB(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..d88b7f2bfd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getFailedJobs( + sdk..V1Database, // name + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..b5b97374d5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getPubSub(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..929f9769fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueBuilds( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..33e71ecac6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueCertificates( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..ca409c1ba5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueDatabases( + '<NAME>', // name (optional) + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..9f2d6f8cf5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueDeletes( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..0392db1079 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueFunctions( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..a71ff13397 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueLogs( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..8c45c1a194 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMails( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..46160a0e88 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMessaging( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..5f8d262e30 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMigrations( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..1b16e6d5b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueStatsResources( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..2a20620cd2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueUsage( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..acc2098365 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueWebhooks( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..0ea8e0e27f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getStorageLocal(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-storage.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage.md new file mode 100644 index 0000000000..d199800559 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getStorage(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-time.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-time.md new file mode 100644 index 0000000000..cd4f42e33e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-time.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getTime(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get.md b/docs/examples/1.8.x/server-nodejs/examples/health/get.md new file mode 100644 index 0000000000..e10c4e28f5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.get(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/get.md b/docs/examples/1.8.x/server-nodejs/examples/locale/get.md new file mode 100644 index 0000000000..d57eb8f241 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.get(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-codes.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-codes.md new file mode 100644 index 0000000000..280d14ae6e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-continents.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-continents.md new file mode 100644 index 0000000000..d04d6d6a47 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listContinents(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..6e41074b61 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..9621e9cbfc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries.md new file mode 100644 index 0000000000..a81b1581f3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountries(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-currencies.md new file mode 100644 index 0000000000..a585fd33ae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-languages.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-languages.md new file mode 100644 index 0000000000..aea0fadf89 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..a28309023a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md new file mode 100644 index 0000000000..b4b1f6622a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createEmail( + '<MESSAGE_ID>', // messageId + '<SUBJECT>', // subject + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..a8af6ba12c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..ee49f64f7c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..e7075dc3b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>', // authKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md new file mode 100644 index 0000000000..bd89f761fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createPush( + '<MESSAGE_ID>', // messageId + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..8cde02e80c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md new file mode 100644 index 0000000000..226f47c8d4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..50a8d202c5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + sdk.SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..9874d072b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..b877172163 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..b40d5ee4e7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md new file mode 100644 index 0000000000..35c93eadca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..4dcb9a841d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..493cd2b660 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..23b474f787 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..1f5e21af93 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..af39f73491 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md new file mode 100644 index 0000000000..fd49104a49 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.delete( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md new file mode 100644 index 0000000000..f83ab51c23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md new file mode 100644 index 0000000000..2f52698bfc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..5132f1772a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md new file mode 100644 index 0000000000..98e38383d4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..56e1288af7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md new file mode 100644 index 0000000000..db0785ece8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..6cb2a01df4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md new file mode 100644 index 0000000000..aefb41d15a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..8d46a08578 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..167b48e978 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md new file mode 100644 index 0000000000..971285d87c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..39e82954d1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md new file mode 100644 index 0000000000..6fd94bba42 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..e782b8c3f7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md new file mode 100644 index 0000000000..2ea2941efd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..9184f283d0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..a1ac18fd60 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..c66b91f8c0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md new file mode 100644 index 0000000000..db52bee373 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..8420a2fac2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md new file mode 100644 index 0000000000..98ee6feb23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..0bbe4cd2cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + sdk.SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..2f23a3b11f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..6fb6c82e8f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md new file mode 100644 index 0000000000..6330970077 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..e4667f56ae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..b95398b4ea --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md new file mode 100644 index 0000000000..010da729ed --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createDeployment( + '<SITE_ID>', // siteId + InputFile.fromPath('/path/to/file', 'filename'), // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..3ce35ff559 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..aebc2b8f4d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md new file mode 100644 index 0000000000..59a51eea76 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..4bd849777b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + sdk.VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create.md new file mode 100644 index 0000000000..ad680592c2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + sdk..Analog, // framework + sdk..Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + sdk..Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..c04a5c38d7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md new file mode 100644 index 0000000000..88e58a5f62 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md new file mode 100644 index 0000000000..abc7e3ac47 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md new file mode 100644 index 0000000000..87fd7d23be --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.delete( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..414d50d4f8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + sdk.DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md new file mode 100644 index 0000000000..3f06b1ab07 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md new file mode 100644 index 0000000000..4318882c95 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md new file mode 100644 index 0000000000..287336fd45 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get.md new file mode 100644 index 0000000000..d382efa2c8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.get( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md new file mode 100644 index 0000000000..dce44ed134 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..0376e4b552 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listFrameworks(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md new file mode 100644 index 0000000000..faaf3d3542 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-specifications.md new file mode 100644 index 0000000000..24ec74c4aa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listSpecifications(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md new file mode 100644 index 0000000000..948e977abc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listVariables( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list.md new file mode 100644 index 0000000000..184f4f3fc4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..7756424523 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..bfbc0f3514 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md new file mode 100644 index 0000000000..c790ca10eb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md new file mode 100644 index 0000000000..e801aed187 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + sdk..Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + sdk..Node145, // buildRuntime (optional) + sdk..Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md new file mode 100644 index 0000000000..fc318f169d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + sdk..None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md new file mode 100644 index 0000000000..b84d9ac653 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + InputFile.fromPath('/path/to/file', 'filename'), // file + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..c2067efda2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md new file mode 100644 index 0000000000..4d2e7128cd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md new file mode 100644 index 0000000000..c8a0b1c55d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..6935bede48 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..fe24419c52 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + sdk.ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + sdk.ImageFormat.Jpg, // output (optional) + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9493cfb0a3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md new file mode 100644 index 0000000000..1a6b500013 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md new file mode 100644 index 0000000000..3c4d4b14f7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md b/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md new file mode 100644 index 0000000000..fb595efc05 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md new file mode 100644 index 0000000000..24e4872d8d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + sdk..None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md new file mode 100644 index 0000000000..7eed687cf5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..64893d77a8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..0d63244727 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md new file mode 100644 index 0000000000..2257fdd7d6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..dbc75feea5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md new file mode 100644 index 0000000000..690b5849eb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md new file mode 100644 index 0000000000..aef047ba5f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..05e66b548c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..69b5c635d2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..b6e7fa517f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + sdk.RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk.RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md new file mode 100644 index 0000000000..84da608d41 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new sdk.Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md new file mode 100644 index 0000000000..6a6918b8df --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md new file mode 100644 index 0000000000..8e14cb45c9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md new file mode 100644 index 0000000000..73cdfa3710 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md new file mode 100644 index 0000000000..54d6bc61bd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..2e7df6aa92 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md new file mode 100644 index 0000000000..a892c61baa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md new file mode 100644 index 0000000000..f6bc7919db --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md new file mode 100644 index 0000000000..5bc60cd6cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md new file mode 100644 index 0000000000..11b16b71ae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md new file mode 100644 index 0000000000..fed3eee5a4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md new file mode 100644 index 0000000000..daa20e17e2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md new file mode 100644 index 0000000000..56ba871d67 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md new file mode 100644 index 0000000000..df952d9595 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md new file mode 100644 index 0000000000..b078574b5c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..bb5856c74a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md new file mode 100644 index 0000000000..f9af43bea5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md new file mode 100644 index 0000000000..7eaf4b8710 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md new file mode 100644 index 0000000000..aa5b341649 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md new file mode 100644 index 0000000000..872a98df08 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..84ff5d2bef --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..c02559a171 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md new file mode 100644 index 0000000000..9560b60e29 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..861fce6add --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md new file mode 100644 index 0000000000..01845ca3cc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..0b7432247f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..6ba5eccf3e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..3409b8caad --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md new file mode 100644 index 0000000000..ff8e98eb38 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md new file mode 100644 index 0000000000..72cef07202 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md new file mode 100644 index 0000000000..f9445a50c1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md new file mode 100644 index 0000000000..c6ffdf3044 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md new file mode 100644 index 0000000000..4fd981ffbf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md new file mode 100644 index 0000000000..2b08d56785 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new sdk.Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..75d681dbf0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md new file mode 100644 index 0000000000..7994423be0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/create.md b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md new file mode 100644 index 0000000000..94de494bf0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5264af7f13 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md b/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md new file mode 100644 index 0000000000..151bfb3f70 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.delete( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md new file mode 100644 index 0000000000..a8e9fc7311 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md new file mode 100644 index 0000000000..18afdaa67b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getPrefs( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get.md new file mode 100644 index 0000000000..8afc800aa9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.get( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md new file mode 100644 index 0000000000..4fead97b8f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/list.md b/docs/examples/1.8.x/server-nodejs/examples/teams/list.md new file mode 100644 index 0000000000..17fe585224 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..74fd9580fe --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md new file mode 100644 index 0000000000..649630ded9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md new file mode 100644 index 0000000000..571f7ce399 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md new file mode 100644 index 0000000000..b054694df5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..d1409c4a99 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md new file mode 100644 index 0000000000..1249839f65 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.delete( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md new file mode 100644 index 0000000000..efb2b8c1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.get( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md new file mode 100644 index 0000000000..8b708f270f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md new file mode 100644 index 0000000000..ebf5aa9bf8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.update( + '<TOKEN_ID>', // tokenId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md new file mode 100644 index 0000000000..dce3646a48 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..d010676d29 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..a2c9b59056 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..954374c37d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..8b2ed93b23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..eca31fe659 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..e7d8588fca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + sdk.PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..831107b569 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..2c2da7e055 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md new file mode 100644 index 0000000000..9d8cc03ba0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createSession( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md new file mode 100644 index 0000000000..7b9e6b0347 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + sdk.MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md new file mode 100644 index 0000000000..de7d866e8c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create.md b/docs/examples/1.8.x/server-nodejs/examples/users/create.md new file mode 100644 index 0000000000..025c15ada1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md new file mode 100644 index 0000000000..4c92f27d25 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..456242e22d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md new file mode 100644 index 0000000000..3f08370f3b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..48714a0db1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md new file mode 100644 index 0000000000..ba7e6afd9c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete.md new file mode 100644 index 0000000000..8fdd9e90b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.delete( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..233c3375ec --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md new file mode 100644 index 0000000000..61933872e4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getPrefs( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md new file mode 100644 index 0000000000..00dc1f118b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get.md b/docs/examples/1.8.x/server-nodejs/examples/users/get.md new file mode 100644 index 0000000000..640aa6315c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.get( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md new file mode 100644 index 0000000000..819b1688ef --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md new file mode 100644 index 0000000000..c1155d55e2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md new file mode 100644 index 0000000000..bbe4ed3711 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..8bffa28834 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listMfaFactors( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md new file mode 100644 index 0000000000..51ba0814c4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md new file mode 100644 index 0000000000..d991dcca73 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list.md b/docs/examples/1.8.x/server-nodejs/examples/users/list.md new file mode 100644 index 0000000000..2bf765bea2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md new file mode 100644 index 0000000000..9dac2d0e54 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md new file mode 100644 index 0000000000..0a8b1aa7af --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md new file mode 100644 index 0000000000..db9e8778ad --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..9d47085370 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md new file mode 100644 index 0000000000..b4acc79938 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md new file mode 100644 index 0000000000..581e57b755 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md new file mode 100644 index 0000000000..f4af49d67e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..ecbe7591df --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md new file mode 100644 index 0000000000..45e5a6582a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md new file mode 100644 index 0000000000..bb7eff8d6b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md new file mode 100644 index 0000000000..57f64ce942 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateStatus( + '<USER_ID>', // userId + false // status +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md new file mode 100644 index 0000000000..c6e4d9a1b0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-php/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..b3e811e18d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-anonymous-session.md @@ -0,0 +1,12 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-php/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..827b1292c5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-email-password-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createEmailPasswordSession( + email: 'email@example.com', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-email-token.md b/docs/examples/1.8.x/server-php/examples/account/create-email-token.md new file mode 100644 index 0000000000..b2c553291b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-email-token.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..3dc486502d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md @@ -0,0 +1,12 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createJWT(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..639b199756 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..da3b4634e0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-mfa-authenticator.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createMfaAuthenticator( + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-php/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..faa679fdf1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticationFactor; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createMfaChallenge( + factor: AuthenticationFactor::EMAIL() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..223c95be97 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..1f91db79fd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\OAuthProvider; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createOAuth2Token( + provider: OAuthProvider::AMAZON(), + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-php/examples/account/create-phone-token.md new file mode 100644 index 0000000000..93c185479e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-phone-token.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-php/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a152667313 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-phone-verification.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-recovery.md b/docs/examples/1.8.x/server-php/examples/account/create-recovery.md new file mode 100644 index 0000000000..c15e41d545 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createRecovery( + email: 'email@example.com', + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-session.md b/docs/examples/1.8.x/server-php/examples/account/create-session.md new file mode 100644 index 0000000000..2ff630a2c2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-verification.md b/docs/examples/1.8.x/server-php/examples/account/create-verification.md new file mode 100644 index 0000000000..4628175fab --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-verification.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createVerification( + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create.md b/docs/examples/1.8.x/server-php/examples/account/create.md new file mode 100644 index 0000000000..f92155b6ab --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->create( + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-identity.md b/docs/examples/1.8.x/server-php/examples/account/delete-identity.md new file mode 100644 index 0000000000..fd66d3ae24 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-identity.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteIdentity( + identityId: '<IDENTITY_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..42806f8358 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteMfaAuthenticator( + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-session.md b/docs/examples/1.8.x/server-php/examples/account/delete-session.md new file mode 100644 index 0000000000..9233ae14e8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-php/examples/account/delete-sessions.md new file mode 100644 index 0000000000..557fd6d3aa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-sessions.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteSessions(); diff --git a/docs/examples/1.8.x/server-php/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..bafd6d8520 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/account/get-prefs.md b/docs/examples/1.8.x/server-php/examples/account/get-prefs.md new file mode 100644 index 0000000000..c7077affe0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get-prefs.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getPrefs(); diff --git a/docs/examples/1.8.x/server-php/examples/account/get-session.md b/docs/examples/1.8.x/server-php/examples/account/get-session.md new file mode 100644 index 0000000000..be2671348e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/get.md b/docs/examples/1.8.x/server-php/examples/account/get.md new file mode 100644 index 0000000000..30cb7b2af5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->get(); diff --git a/docs/examples/1.8.x/server-php/examples/account/list-identities.md b/docs/examples/1.8.x/server-php/examples/account/list-identities.md new file mode 100644 index 0000000000..a7d0a85c66 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-identities.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listIdentities( + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/list-logs.md b/docs/examples/1.8.x/server-php/examples/account/list-logs.md new file mode 100644 index 0000000000..cc7a173d2e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-logs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listLogs( + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-php/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..6756573cdb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-mfa-factors.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listMfaFactors(); diff --git a/docs/examples/1.8.x/server-php/examples/account/list-sessions.md b/docs/examples/1.8.x/server-php/examples/account/list-sessions.md new file mode 100644 index 0000000000..7f9749f7be --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-sessions.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listSessions(); diff --git a/docs/examples/1.8.x/server-php/examples/account/update-email.md b/docs/examples/1.8.x/server-php/examples/account/update-email.md new file mode 100644 index 0000000000..c7c0d485ea --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-email.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateEmail( + email: 'email@example.com', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..a1978e63ac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMFA( + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..fc42cbe6d1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..6a09d95a10 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-mfa-authenticator.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaAuthenticator( + type: AuthenticatorType::TOTP(), + otp: '<OTP>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-php/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..03ace31144 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c7ec6cb2b2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/account/update-name.md b/docs/examples/1.8.x/server-php/examples/account/update-name.md new file mode 100644 index 0000000000..2603b6e68b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-name.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateName( + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-password.md b/docs/examples/1.8.x/server-php/examples/account/update-password.md new file mode 100644 index 0000000000..c5101381e4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-password.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePassword( + password: '', + oldPassword: 'password' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-php/examples/account/update-phone-session.md new file mode 100644 index 0000000000..12d71c2fcd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-phone-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-php/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..df59922996 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-phone.md b/docs/examples/1.8.x/server-php/examples/account/update-phone.md new file mode 100644 index 0000000000..853cb62fce --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-phone.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePhone( + phone: '+12065550100', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-prefs.md b/docs/examples/1.8.x/server-php/examples/account/update-prefs.md new file mode 100644 index 0000000000..698da0fd8a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePrefs( + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-recovery.md b/docs/examples/1.8.x/server-php/examples/account/update-recovery.md new file mode 100644 index 0000000000..63518b0029 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-recovery.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-session.md b/docs/examples/1.8.x/server-php/examples/account/update-session.md new file mode 100644 index 0000000000..11cb4c7d98 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-status.md b/docs/examples/1.8.x/server-php/examples/account/update-status.md new file mode 100644 index 0000000000..7c8075e5c7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-status.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateStatus(); diff --git a/docs/examples/1.8.x/server-php/examples/account/update-verification.md b/docs/examples/1.8.x/server-php/examples/account/update-verification.md new file mode 100644 index 0000000000..60ec0b3196 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-php/examples/avatars/get-browser.md new file mode 100644 index 0000000000..2449c26032 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-browser.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Browser; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getBrowser( + code: Browser::AVANTBROWSER(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-php/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..123b345a43 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-credit-card.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\CreditCard; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getCreditCard( + code: CreditCard::AMERICANEXPRESS(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-php/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..1e671864c8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-favicon.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getFavicon( + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-php/examples/avatars/get-flag.md new file mode 100644 index 0000000000..5b7d8babc7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-flag.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Flag; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getFlag( + code: Flag::AFGHANISTAN(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-image.md b/docs/examples/1.8.x/server-php/examples/avatars/get-image.md new file mode 100644 index 0000000000..e1555453ec --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getImage( + url: 'https://example.com', + width: 0, // optional + height: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-php/examples/avatars/get-initials.md new file mode 100644 index 0000000000..d84e23a157 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-initials.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getInitials( + name: '<NAME>', // optional + width: 0, // optional + height: 0, // optional + background: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..0d5936af6b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getQR( + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..805d022194 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-collection.md b/docs/examples/1.8.x/server-php/examples/databases/create-collection.md new file mode 100644 index 0000000000..700d97177b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-collection.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..dd2fcecc80 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-datetime-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-document.md b/docs/examples/1.8.x/server-php/examples/databases/create-document.md new file mode 100644 index 0000000000..8726b37719 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-document.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$databases = new Databases($client); + +$result = $databases->createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md new file mode 100644 index 0000000000..9429b57aba --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..1274a4b9e1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-email-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..9abf2dfa1b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-enum-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..e6eecb5298 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-float-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-index.md b/docs/examples/1.8.x/server-php/examples/databases/create-index.md new file mode 100644 index 0000000000..9e8a221e13 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: IndexType::KEY(), + attributes: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..1dbeefa547 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-integer-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..f42717caa4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-ip-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..caccd36031 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-relationship-attribute.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..5a4f72b6c8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-string-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..6b9bc800e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-url-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create.md b/docs/examples/1.8.x/server-php/examples/databases/create.md new file mode 100644 index 0000000000..73c618874a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..40e14af844 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..71b7162655 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-attribute.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-php/examples/databases/delete-collection.md new file mode 100644 index 0000000000..4e98dfdb4e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-collection.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-document.md b/docs/examples/1.8.x/server-php/examples/databases/delete-document.md new file mode 100644 index 0000000000..def7f24569 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-document.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-php/examples/databases/delete-documents.md new file mode 100644 index 0000000000..3552d85317 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-documents.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-index.md b/docs/examples/1.8.x/server-php/examples/databases/delete-index.md new file mode 100644 index 0000000000..79e476b6d0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete.md b/docs/examples/1.8.x/server-php/examples/databases/delete.md new file mode 100644 index 0000000000..c796b7c406 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->delete( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/get-attribute.md new file mode 100644 index 0000000000..ba82db4065 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-attribute.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-collection.md b/docs/examples/1.8.x/server-php/examples/databases/get-collection.md new file mode 100644 index 0000000000..ecddab053d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-collection.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-document.md b/docs/examples/1.8.x/server-php/examples/databases/get-document.md new file mode 100644 index 0000000000..a3204c50a7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-document.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-index.md b/docs/examples/1.8.x/server-php/examples/databases/get-index.md new file mode 100644 index 0000000000..e9c6307671 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get.md b/docs/examples/1.8.x/server-php/examples/databases/get.md new file mode 100644 index 0000000000..9aa6395587 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->get( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..fb61d87295 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-php/examples/databases/list-attributes.md new file mode 100644 index 0000000000..3105fc419c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-attributes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-collections.md b/docs/examples/1.8.x/server-php/examples/databases/list-collections.md new file mode 100644 index 0000000000..533b26a055 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-collections.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-documents.md b/docs/examples/1.8.x/server-php/examples/databases/list-documents.md new file mode 100644 index 0000000000..07183ac8bf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-documents.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-php/examples/databases/list-indexes.md new file mode 100644 index 0000000000..65b45dae80 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list.md b/docs/examples/1.8.x/server-php/examples/databases/list.md new file mode 100644 index 0000000000..6bba74da59 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..2e4bee72fe --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-collection.md b/docs/examples/1.8.x/server-php/examples/databases/update-collection.md new file mode 100644 index 0000000000..dd030c0792 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-collection.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..b1a03ec028 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-datetime-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-document.md b/docs/examples/1.8.x/server-php/examples/databases/update-document.md new file mode 100644 index 0000000000..f1c8a34680 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-document.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-documents.md b/docs/examples/1.8.x/server-php/examples/databases/update-documents.md new file mode 100644 index 0000000000..51b4e18bc2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-documents.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..dc9865f81a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-email-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..f7cd0b7b83 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-enum-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..51f6ec9239 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-float-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..bdbd96ca12 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-integer-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..130cd0cc9f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-ip-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..01783cf3bf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..e0c8f992ea --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-string-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..c200463894 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-url-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update.md b/docs/examples/1.8.x/server-php/examples/databases/update.md new file mode 100644 index 0000000000..9b0b0789ca --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md new file mode 100644 index 0000000000..2f8464c995 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$databases = new Databases($client); + +$result = $databases->upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..11898dc33a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-deployment.md new file mode 100644 index 0000000000..7e48b89ca7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile::withPath('file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..a898762cb8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md new file mode 100644 index 0000000000..9aeb976cf3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + path: '<PATH>', // optional + method: ExecutionMethod::GET(), // optional + headers: [], // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..9d22bdc1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-template-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-variable.md b/docs/examples/1.8.x/server-php/examples/functions/create-variable.md new file mode 100644 index 0000000000..ec470d5457 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-variable.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createVariable( + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..bb4622e67a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-vcs-deployment.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\VCSDeploymentType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create.md b/docs/examples/1.8.x/server-php/examples/functions/create.md new file mode 100644 index 0000000000..3d37b8068e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE145(), + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..20285d7610 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-php/examples/functions/delete-execution.md new file mode 100644 index 0000000000..e55a8b1892 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete-execution.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-php/examples/functions/delete-variable.md new file mode 100644 index 0000000000..e1fb391d79 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete.md b/docs/examples/1.8.x/server-php/examples/functions/delete.md new file mode 100644 index 0000000000..9f87f5c9f0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->delete( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-php/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..7b3e18751e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-deployment-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/get-deployment.md new file mode 100644 index 0000000000..945933b2ad --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-execution.md b/docs/examples/1.8.x/server-php/examples/functions/get-execution.md new file mode 100644 index 0000000000..7dfeeed0c0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-variable.md b/docs/examples/1.8.x/server-php/examples/functions/get-variable.md new file mode 100644 index 0000000000..4c8d3d6b53 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get.md b/docs/examples/1.8.x/server-php/examples/functions/get.md new file mode 100644 index 0000000000..ca2160f6c9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->get( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-php/examples/functions/list-deployments.md new file mode 100644 index 0000000000..7bbaa0ed3e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-deployments.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-executions.md b/docs/examples/1.8.x/server-php/examples/functions/list-executions.md new file mode 100644 index 0000000000..77a8ba7223 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-executions.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->listExecutions( + functionId: '<FUNCTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-php/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..6c77c42678 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-runtimes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listRuntimes(); diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-php/examples/functions/list-specifications.md new file mode 100644 index 0000000000..eec5c33c9d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-specifications.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listSpecifications(); diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-variables.md b/docs/examples/1.8.x/server-php/examples/functions/list-variables.md new file mode 100644 index 0000000000..f85e85490c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-variables.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listVariables( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list.md b/docs/examples/1.8.x/server-php/examples/functions/list.md new file mode 100644 index 0000000000..de914afc58 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-php/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..de36d4e8ce --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update-deployment-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..38ba026ba1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update-function-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update-variable.md b/docs/examples/1.8.x/server-php/examples/functions/update-variable.md new file mode 100644 index 0000000000..b15597a622 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update-variable.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update.md b/docs/examples/1.8.x/server-php/examples/functions/update.md new file mode 100644 index 0000000000..ea8d863ae5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update.md @@ -0,0 +1,32 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE145(), // optional + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/graphql/mutation.md b/docs/examples/1.8.x/server-php/examples/graphql/mutation.md new file mode 100644 index 0000000000..c349bc2dbd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/graphql/mutation.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$graphql = new Graphql($client); + +$result = $graphql->mutation( + query: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/graphql/query.md b/docs/examples/1.8.x/server-php/examples/graphql/query.md new file mode 100644 index 0000000000..e6e277c27b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/graphql/query.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$graphql = new Graphql($client); + +$result = $graphql->query( + query: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-php/examples/health/get-antivirus.md new file mode 100644 index 0000000000..47210646df --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-antivirus.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getAntivirus(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-cache.md b/docs/examples/1.8.x/server-php/examples/health/get-cache.md new file mode 100644 index 0000000000..2e81dae328 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-cache.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getCache(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-certificate.md b/docs/examples/1.8.x/server-php/examples/health/get-certificate.md new file mode 100644 index 0000000000..408581beac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-certificate.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getCertificate( + domain: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-d-b.md b/docs/examples/1.8.x/server-php/examples/health/get-d-b.md new file mode 100644 index 0000000000..cfec70e604 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-d-b.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getDB(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-php/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..02959db3b5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-failed-jobs.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getFailedJobs( + name: ::V1DATABASE(), + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-php/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..1c346caab6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-pub-sub.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getPubSub(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..8c1f77433b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-builds.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueBuilds( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..92fb79a98c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-certificates.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueCertificates( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..745b469434 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-databases.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueDatabases( + name: '<NAME>', // optional + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..d3952685c4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-deletes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueDeletes( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..1a5bea2b4c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-functions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueFunctions( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..cf5e3b9d83 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-logs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueLogs( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..132dfa68aa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-mails.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMails( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..fd5fdb1ede --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-messaging.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMessaging( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..68110189e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-migrations.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMigrations( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..d0bd6c054e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-stats-resources.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueStatsResources( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..627a85c845 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-usage.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueUsage( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d6ccd7cd83 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-webhooks.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueWebhooks( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-php/examples/health/get-storage-local.md new file mode 100644 index 0000000000..041d24954c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-storage-local.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getStorageLocal(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-storage.md b/docs/examples/1.8.x/server-php/examples/health/get-storage.md new file mode 100644 index 0000000000..377416ed13 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-storage.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getStorage(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-time.md b/docs/examples/1.8.x/server-php/examples/health/get-time.md new file mode 100644 index 0000000000..aa2699349d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-time.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getTime(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get.md b/docs/examples/1.8.x/server-php/examples/health/get.md new file mode 100644 index 0000000000..fec3e3f485 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->get(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/get.md b/docs/examples/1.8.x/server-php/examples/locale/get.md new file mode 100644 index 0000000000..ef4c0432dd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->get(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-codes.md b/docs/examples/1.8.x/server-php/examples/locale/list-codes.md new file mode 100644 index 0000000000..273fad0839 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-continents.md b/docs/examples/1.8.x/server-php/examples/locale/list-continents.md new file mode 100644 index 0000000000..e8c7ca46df --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-continents.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listContinents(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..c5dd1d2ad6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountriesEU(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-php/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..7585c1071e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-countries-phones.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-countries.md b/docs/examples/1.8.x/server-php/examples/locale/list-countries.md new file mode 100644 index 0000000000..63a2e0b5f7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-countries.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountries(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-php/examples/locale/list-currencies.md new file mode 100644 index 0000000000..d385018e7d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-currencies.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCurrencies(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-languages.md b/docs/examples/1.8.x/server-php/examples/locale/list-languages.md new file mode 100644 index 0000000000..f0ca4d4f04 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-languages.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listLanguages(); diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..da13d17231 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-email.md b/docs/examples/1.8.x/server-php/examples/messaging/create-email.md new file mode 100644 index 0000000000..9de24873bf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-email.md @@ -0,0 +1,26 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + cc: [], // optional + bcc: [], // optional + attachments: [], // optional + draft: false, // optional + html: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..baf72a1df4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-fcm-provider.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: [], // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6c62ee8837 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + domain: '<DOMAIN>', // optional + isEuRegion: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..1eb954a2c6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-push.md b/docs/examples/1.8.x/server-php/examples/messaging/create-push.md new file mode 100644 index 0000000000..46aeeb3b8b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [], // optional + action: '<ACTION>', // optional + image: '[ID1:ID2]', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..892d856305 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-php/examples/messaging/create-sms.md new file mode 100644 index 0000000000..1e2d9ac765 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-sms.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSms( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..4dcfb3a088 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-php/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..3516fa3d6a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-subscriber.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..9006918029 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..5215d52642 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/create-topic.md new file mode 100644 index 0000000000..e94141cc73 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-topic.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..c356828640 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..adeacbc45e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..f37d18b4fd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete-provider.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->deleteProvider( + providerId: '<PROVIDER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-php/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..f7a8425920 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..2ec899b1d6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete-topic.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->deleteTopic( + topicId: '<TOPIC_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete.md b/docs/examples/1.8.x/server-php/examples/messaging/delete.md new file mode 100644 index 0000000000..5781838bdc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->delete( + messageId: '<MESSAGE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-message.md b/docs/examples/1.8.x/server-php/examples/messaging/get-message.md new file mode 100644 index 0000000000..cf922219c7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-message.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getMessage( + messageId: '<MESSAGE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/get-provider.md new file mode 100644 index 0000000000..d19f5c65e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-provider.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getProvider( + providerId: '<PROVIDER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-php/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..e2a0d7ef35 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-subscriber.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/get-topic.md new file mode 100644 index 0000000000..fc06cbbc95 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-topic.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getTopic( + topicId: '<TOPIC_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..03231375f8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-message-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listMessageLogs( + messageId: '<MESSAGE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-php/examples/messaging/list-messages.md new file mode 100644 index 0000000000..965fe08fc7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-messages.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listMessages( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..761bb966d6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-provider-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listProviderLogs( + providerId: '<PROVIDER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-php/examples/messaging/list-providers.md new file mode 100644 index 0000000000..614e9c58f1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-providers.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listProviders( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..c710575a46 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listSubscriberLogs( + subscriberId: '<SUBSCRIBER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-php/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..d2625cd555 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-subscribers.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-php/examples/messaging/list-targets.md new file mode 100644 index 0000000000..1112d28003 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-targets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTargets( + messageId: '<MESSAGE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..3bbb35a006 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-topic-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTopicLogs( + topicId: '<TOPIC_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-php/examples/messaging/list-topics.md new file mode 100644 index 0000000000..debb363133 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-topics.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTopics( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..724453b9b1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-email.md b/docs/examples/1.8.x/server-php/examples/messaging/update-email.md new file mode 100644 index 0000000000..dd0f645af6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-email.md @@ -0,0 +1,26 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + scheduledAt: '', // optional + attachments: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..36672f4b65 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-fcm-provider.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + serviceAccountJSON: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..c99ebc7d73 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + apiKey: '<API_KEY>', // optional + domain: '<DOMAIN>', // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..f6f557cce4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-push.md b/docs/examples/1.8.x/server-php/examples/messaging/update-push.md new file mode 100644 index 0000000000..e1df0b9132 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + title: '<TITLE>', // optional + body: '<BODY>', // optional + data: [], // optional + action: '<ACTION>', // optional + image: '[ID1:ID2]', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..b8473c16a3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-php/examples/messaging/update-sms.md new file mode 100644 index 0000000000..730da4178a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-sms.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSms( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + content: '<CONTENT>', // optional + draft: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..a16a630283 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + host: '<HOST>', // optional + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..29a54bfaed --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..e6a1ed1a1e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/update-topic.md new file mode 100644 index 0000000000..b1f9a32ec5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-topic.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..def821adc4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..0841e284eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-deployment.md new file mode 100644 index 0000000000..30770b7871 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-deployment.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createDeployment( + siteId: '<SITE_ID>', + code: InputFile::withPath('file.png'), + activate: false, + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..84f65cd025 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..f2d1f3cd8b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-template-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-variable.md b/docs/examples/1.8.x/server-php/examples/sites/create-variable.md new file mode 100644 index 0000000000..3097e19305 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-variable.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createVariable( + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..7f63dffdf8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-vcs-deployment.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\VCSDeploymentType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createVcsDeployment( + siteId: '<SITE_ID>', + type: VCSDeploymentType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create.md b/docs/examples/1.8.x/server-php/examples/sites/create.md new file mode 100644 index 0000000000..4a1c3a4fcb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create.md @@ -0,0 +1,34 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG(), + buildRuntime: ::NODE145(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + adapter: ::STATIC(), // optional + installationId: '<INSTALLATION_ID>', // optional + fallbackFile: '<FALLBACK_FILE>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..4e24748c37 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete-log.md b/docs/examples/1.8.x/server-php/examples/sites/delete-log.md new file mode 100644 index 0000000000..b6e30643f6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete-log.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-php/examples/sites/delete-variable.md new file mode 100644 index 0000000000..663254303a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete.md b/docs/examples/1.8.x/server-php/examples/sites/delete.md new file mode 100644 index 0000000000..8e6363aa35 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->delete( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-php/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..91c6b6e52a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-deployment-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/get-deployment.md new file mode 100644 index 0000000000..19525d9274 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-log.md b/docs/examples/1.8.x/server-php/examples/sites/get-log.md new file mode 100644 index 0000000000..5ceb2b9110 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-log.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-variable.md b/docs/examples/1.8.x/server-php/examples/sites/get-variable.md new file mode 100644 index 0000000000..0cab412b2e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get.md b/docs/examples/1.8.x/server-php/examples/sites/get.md new file mode 100644 index 0000000000..e5ec061bad --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->get( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-php/examples/sites/list-deployments.md new file mode 100644 index 0000000000..4d687ec59e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-deployments.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listDeployments( + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-php/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..87df92d9ee --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-frameworks.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listFrameworks(); diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-logs.md b/docs/examples/1.8.x/server-php/examples/sites/list-logs.md new file mode 100644 index 0000000000..5674e98f5e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listLogs( + siteId: '<SITE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-php/examples/sites/list-specifications.md new file mode 100644 index 0000000000..42dae1b799 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-specifications.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listSpecifications(); diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-variables.md b/docs/examples/1.8.x/server-php/examples/sites/list-variables.md new file mode 100644 index 0000000000..36aad640fe --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-variables.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listVariables( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list.md b/docs/examples/1.8.x/server-php/examples/sites/list.md new file mode 100644 index 0000000000..4e16c690bc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-php/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..2714b3570f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update-deployment-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..6e2614cb41 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update-site-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update-variable.md b/docs/examples/1.8.x/server-php/examples/sites/update-variable.md new file mode 100644 index 0000000000..84bafe28c4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update-variable.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update.md b/docs/examples/1.8.x/server-php/examples/sites/update.md new file mode 100644 index 0000000000..f2ca54a987 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + buildRuntime: ::NODE145(), // optional + adapter: ::STATIC(), // optional + fallbackFile: '<FALLBACK_FILE>', // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md new file mode 100644 index 0000000000..cd17ffedac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: ::NONE(), // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/create-file.md b/docs/examples/1.8.x/server-php/examples/storage/create-file.md new file mode 100644 index 0000000000..2d13305984 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/create-file.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile::withPath('file.png'), + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..50adf35b6b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/delete-bucket.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->deleteBucket( + bucketId: '<BUCKET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/delete-file.md b/docs/examples/1.8.x/server-php/examples/storage/delete-file.md new file mode 100644 index 0000000000..d4c45eb66a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e62c43d2d3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-bucket.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->getBucket( + bucketId: '<BUCKET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-php/examples/storage/get-file-download.md new file mode 100644 index 0000000000..defefa5948 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-php/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..0b65fc326a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file-preview.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity::CENTER(), // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: '', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: '', // optional + output: ImageFormat::JPG(), // optional + token: '<TOKEN>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-php/examples/storage/get-file-view.md new file mode 100644 index 0000000000..dfc84ca102 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file.md b/docs/examples/1.8.x/server-php/examples/storage/get-file.md new file mode 100644 index 0000000000..6964144801 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-php/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a4538c6f3a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/list-buckets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->listBuckets( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/list-files.md b/docs/examples/1.8.x/server-php/examples/storage/list-files.md new file mode 100644 index 0000000000..ede0e7c979 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/list-files.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md new file mode 100644 index 0000000000..1517e36621 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: ::NONE(), // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/update-file.md b/docs/examples/1.8.x/server-php/examples/storage/update-file.md new file mode 100644 index 0000000000..7b467acfe3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/update-file.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..28339753ac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..d7f18f2ede --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md new file mode 100644 index 0000000000..15ec2cf2e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..aa2b6138f7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md new file mode 100644 index 0000000000..1f620dc887 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-index.md b/docs/examples/1.8.x/server-php/examples/tables/create-index.md new file mode 100644 index 0000000000..9844e041d4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType::KEY(), + columns: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..185f12c5cb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..1f74e4dd72 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..c86b4c558a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-row.md b/docs/examples/1.8.x/server-php/examples/tables/create-row.md new file mode 100644 index 0000000000..6b64a7e058 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-row.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$tables = new Tables($client); + +$result = $tables->createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-rows.md b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md new file mode 100644 index 0000000000..a1bf72ad13 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md new file mode 100644 index 0000000000..085aff25c8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d0bdb55dd4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create.md b/docs/examples/1.8.x/server-php/examples/tables/create.md new file mode 100644 index 0000000000..773d7a24eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->create( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..b0c44b6d0a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-column.md b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md new file mode 100644 index 0000000000..9bd6738cb7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-index.md b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md new file mode 100644 index 0000000000..bbd748433a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-row.md b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md new file mode 100644 index 0000000000..0c4ab6ef40 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md new file mode 100644 index 0000000000..b0c984cc17 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete.md b/docs/examples/1.8.x/server-php/examples/tables/delete.md new file mode 100644 index 0000000000..f145eedc91 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->delete( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-column.md b/docs/examples/1.8.x/server-php/examples/tables/get-column.md new file mode 100644 index 0000000000..b8b676564e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-index.md b/docs/examples/1.8.x/server-php/examples/tables/get-index.md new file mode 100644 index 0000000000..5d1139d596 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-row.md b/docs/examples/1.8.x/server-php/examples/tables/get-row.md new file mode 100644 index 0000000000..ccde387b89 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get.md b/docs/examples/1.8.x/server-php/examples/tables/get.md new file mode 100644 index 0000000000..d07ef7338a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->get( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..aa5a3c0d53 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-columns.md b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md new file mode 100644 index 0000000000..0338567240 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md new file mode 100644 index 0000000000..df1f8c6aca --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-rows.md b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md new file mode 100644 index 0000000000..2041d72b05 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list.md b/docs/examples/1.8.x/server-php/examples/tables/list.md new file mode 100644 index 0000000000..37df0a4baa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->list( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..8ad80506d8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..5185357f17 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md new file mode 100644 index 0000000000..7acbb811eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..478905af67 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md new file mode 100644 index 0000000000..1d9c5fd997 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..f6998db0a2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..e7906fbd0f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..d6505c77f1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-row.md b/docs/examples/1.8.x/server-php/examples/tables/update-row.md new file mode 100644 index 0000000000..921c43d935 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-rows.md b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md new file mode 100644 index 0000000000..f61fa2b17d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md new file mode 100644 index 0000000000..8856ec19c1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md new file mode 100644 index 0000000000..faa46d1806 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update.md b/docs/examples/1.8.x/server-php/examples/tables/update.md new file mode 100644 index 0000000000..39f076b8f8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->update( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md new file mode 100644 index 0000000000..2bddd9b5b3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$tables = new Tables($client); + +$result = $tables->upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..5ed5f028a9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/create-membership.md b/docs/examples/1.8.x/server-php/examples/teams/create-membership.md new file mode 100644 index 0000000000..285368f9dd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/create.md b/docs/examples/1.8.x/server-php/examples/teams/create.md new file mode 100644 index 0000000000..643fa0eb11 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-php/examples/teams/delete-membership.md new file mode 100644 index 0000000000..579b790c55 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/delete.md b/docs/examples/1.8.x/server-php/examples/teams/delete.md new file mode 100644 index 0000000000..9db4e7e9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->delete( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/get-membership.md b/docs/examples/1.8.x/server-php/examples/teams/get-membership.md new file mode 100644 index 0000000000..bd6cbe8b42 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-php/examples/teams/get-prefs.md new file mode 100644 index 0000000000..fbade4fc2f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/get-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->getPrefs( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/get.md b/docs/examples/1.8.x/server-php/examples/teams/get.md new file mode 100644 index 0000000000..0dafa8a5d3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->get( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-php/examples/teams/list-memberships.md new file mode 100644 index 0000000000..817ea7fefc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/list-memberships.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->listMemberships( + teamId: '<TEAM_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/list.md b/docs/examples/1.8.x/server-php/examples/teams/list.md new file mode 100644 index 0000000000..99d9895fe5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-php/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..5dbfd4cb0f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-membership.md b/docs/examples/1.8.x/server-php/examples/teams/update-membership.md new file mode 100644 index 0000000000..10f135b01f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-membership.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-name.md b/docs/examples/1.8.x/server-php/examples/teams/update-name.md new file mode 100644 index 0000000000..bc13d924e4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-name.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateName( + teamId: '<TEAM_ID>', + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-php/examples/teams/update-prefs.md new file mode 100644 index 0000000000..bd8d9de32f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updatePrefs( + teamId: '<TEAM_ID>', + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-php/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..e4f230217a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/create-file-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->createFileToken( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/delete.md b/docs/examples/1.8.x/server-php/examples/tokens/delete.md new file mode 100644 index 0000000000..278be90b12 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->delete( + tokenId: '<TOKEN_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/get.md b/docs/examples/1.8.x/server-php/examples/tokens/get.md new file mode 100644 index 0000000000..e7b4e1081b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->get( + tokenId: '<TOKEN_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/list.md b/docs/examples/1.8.x/server-php/examples/tokens/list.md new file mode 100644 index 0000000000..b89420bed1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/list.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/update.md b/docs/examples/1.8.x/server-php/examples/tokens/update.md new file mode 100644 index 0000000000..ea95322a43 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/update.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->update( + tokenId: '<TOKEN_ID>', + expire: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-php/examples/users/create-argon2user.md new file mode 100644 index 0000000000..a9166ef3b0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-argon2user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-php/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..c9fd81e43a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-bcrypt-user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..1c1c6d40bd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createJWT( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // optional + duration: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..696cbbeb57 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..372fb1bc6a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..d56c4651f6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..0b9a27ed8e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash::SHA1(), // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..f579efb5f2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..b406b9404a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-user.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: null, + passwordMemory: null, + passwordParallel: null, + passwordLength: null, + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-session.md b/docs/examples/1.8.x/server-php/examples/users/create-session.md new file mode 100644 index 0000000000..1589315f92 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createSession( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-target.md b/docs/examples/1.8.x/server-php/examples/users/create-target.md new file mode 100644 index 0000000000..57946a440f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-target.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\MessagingProviderType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType::EMAIL(), + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-token.md b/docs/examples/1.8.x/server-php/examples/users/create-token.md new file mode 100644 index 0000000000..1b92f5171d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createToken( + userId: '<USER_ID>', + length: 4, // optional + expire: 60 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create.md b/docs/examples/1.8.x/server-php/examples/users/create.md new file mode 100644 index 0000000000..595f24fbce --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->create( + userId: '<USER_ID>', + email: 'email@example.com', // optional + phone: '+12065550100', // optional + password: '', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-identity.md b/docs/examples/1.8.x/server-php/examples/users/delete-identity.md new file mode 100644 index 0000000000..26b71eead2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-identity.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteIdentity( + identityId: '<IDENTITY_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..8ef1279589 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteMfaAuthenticator( + userId: '<USER_ID>', + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-session.md b/docs/examples/1.8.x/server-php/examples/users/delete-session.md new file mode 100644 index 0000000000..493cf53d2f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-session.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-php/examples/users/delete-sessions.md new file mode 100644 index 0000000000..cd6d11e1d7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-sessions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteSessions( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-target.md b/docs/examples/1.8.x/server-php/examples/users/delete-target.md new file mode 100644 index 0000000000..0d85d3e4df --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-target.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete.md b/docs/examples/1.8.x/server-php/examples/users/delete.md new file mode 100644 index 0000000000..883156ecd6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->delete( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..db090fb245 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get-prefs.md b/docs/examples/1.8.x/server-php/examples/users/get-prefs.md new file mode 100644 index 0000000000..5e99e14b52 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getPrefs( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get-target.md b/docs/examples/1.8.x/server-php/examples/users/get-target.md new file mode 100644 index 0000000000..31baf3c852 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get-target.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get.md b/docs/examples/1.8.x/server-php/examples/users/get.md new file mode 100644 index 0000000000..0ce39ae6e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->get( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-identities.md b/docs/examples/1.8.x/server-php/examples/users/list-identities.md new file mode 100644 index 0000000000..fd15b7b51a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-identities.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listIdentities( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-logs.md b/docs/examples/1.8.x/server-php/examples/users/list-logs.md new file mode 100644 index 0000000000..7aea2dc59a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listLogs( + userId: '<USER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-memberships.md b/docs/examples/1.8.x/server-php/examples/users/list-memberships.md new file mode 100644 index 0000000000..53c4b1b9cc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-memberships.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listMemberships( + userId: '<USER_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-php/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..6a0088c9bd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-mfa-factors.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listMfaFactors( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-sessions.md b/docs/examples/1.8.x/server-php/examples/users/list-sessions.md new file mode 100644 index 0000000000..bdbd0e5e51 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-sessions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listSessions( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-targets.md b/docs/examples/1.8.x/server-php/examples/users/list-targets.md new file mode 100644 index 0000000000..005d51a531 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-targets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listTargets( + userId: '<USER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list.md b/docs/examples/1.8.x/server-php/examples/users/list.md new file mode 100644 index 0000000000..04217363f0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-php/examples/users/update-email-verification.md new file mode 100644 index 0000000000..636f1d2404 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-email-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-email.md b/docs/examples/1.8.x/server-php/examples/users/update-email.md new file mode 100644 index 0000000000..21ec88b334 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-email.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateEmail( + userId: '<USER_ID>', + email: 'email@example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-labels.md b/docs/examples/1.8.x/server-php/examples/users/update-labels.md new file mode 100644 index 0000000000..7d4ae5de50 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-labels.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateLabels( + userId: '<USER_ID>', + labels: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..75214de880 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-mfa.md b/docs/examples/1.8.x/server-php/examples/users/update-mfa.md new file mode 100644 index 0000000000..3eda496f1f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-mfa.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateMfa( + userId: '<USER_ID>', + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-name.md b/docs/examples/1.8.x/server-php/examples/users/update-name.md new file mode 100644 index 0000000000..09bb07cdd7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-name.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateName( + userId: '<USER_ID>', + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-password.md b/docs/examples/1.8.x/server-php/examples/users/update-password.md new file mode 100644 index 0000000000..6d58605d5c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-password.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePassword( + userId: '<USER_ID>', + password: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-php/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..019fb3f148 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-phone-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-phone.md b/docs/examples/1.8.x/server-php/examples/users/update-phone.md new file mode 100644 index 0000000000..13bd41bfa8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-phone.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePhone( + userId: '<USER_ID>', + number: '+12065550100' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-prefs.md b/docs/examples/1.8.x/server-php/examples/users/update-prefs.md new file mode 100644 index 0000000000..9491239271 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePrefs( + userId: '<USER_ID>', + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-status.md b/docs/examples/1.8.x/server-php/examples/users/update-status.md new file mode 100644 index 0000000000..f29dc95e2f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateStatus( + userId: '<USER_ID>', + status: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-target.md b/docs/examples/1.8.x/server-php/examples/users/update-target.md new file mode 100644 index 0000000000..00ad27b9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-target.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // optional + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-python/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..c3b7a87d27 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_anonymous_session() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-python/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..e831821a6c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_email_password_session( + email = 'email@example.com', + password = 'password' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-email-token.md b/docs/examples/1.8.x/server-python/examples/account/create-email-token.md new file mode 100644 index 0000000000..7ff4f6b8a9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_email_token( + user_id = '<USER_ID>', + email = 'email@example.com', + phrase = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..172f45f996 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_jwt() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..14e76ed4d3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_magic_url_token( + user_id = '<USER_ID>', + email = 'email@example.com', + url = 'https://example.com', # optional + phrase = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..70cee1d60c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_mfa_authenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-python/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..abd746c605 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticationFactor + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_mfa_challenge( + factor = AuthenticationFactor.EMAIL +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..69aaa6091f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..2dc171bb31 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import OAuthProvider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_o_auth2_token( + provider = OAuthProvider.AMAZON, + success = 'https://example.com', # optional + failure = 'https://example.com', # optional + scopes = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-python/examples/account/create-phone-token.md new file mode 100644 index 0000000000..06c2b20414 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_phone_token( + user_id = '<USER_ID>', + phone = '+12065550100' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-python/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..c130646bee --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_phone_verification() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-recovery.md b/docs/examples/1.8.x/server-python/examples/account/create-recovery.md new file mode 100644 index 0000000000..51c1777245 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_recovery( + email = 'email@example.com', + url = 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-session.md b/docs/examples/1.8.x/server-python/examples/account/create-session.md new file mode 100644 index 0000000000..1048dfedb2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-verification.md b/docs/examples/1.8.x/server-python/examples/account/create-verification.md new file mode 100644 index 0000000000..d66fc2cd7d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-verification.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_verification( + url = 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create.md b/docs/examples/1.8.x/server-python/examples/account/create.md new file mode 100644 index 0000000000..7eda5a37fe --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create( + user_id = '<USER_ID>', + email = 'email@example.com', + password = '', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-identity.md b/docs/examples/1.8.x/server-python/examples/account/delete-identity.md new file mode 100644 index 0000000000..0c894fa693 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_identity( + identity_id = '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..83709c7aff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_mfa_authenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-session.md b/docs/examples/1.8.x/server-python/examples/account/delete-session.md new file mode 100644 index 0000000000..5967d7026a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-python/examples/account/delete-sessions.md new file mode 100644 index 0000000000..5061f84c5d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_sessions() diff --git a/docs/examples/1.8.x/server-python/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c8fe494d0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-python/examples/account/get-prefs.md b/docs/examples/1.8.x/server-python/examples/account/get-prefs.md new file mode 100644 index 0000000000..d577b4b274 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_prefs() diff --git a/docs/examples/1.8.x/server-python/examples/account/get-session.md b/docs/examples/1.8.x/server-python/examples/account/get-session.md new file mode 100644 index 0000000000..3e2937b913 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/get.md b/docs/examples/1.8.x/server-python/examples/account/get.md new file mode 100644 index 0000000000..542622851c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get() diff --git a/docs/examples/1.8.x/server-python/examples/account/list-identities.md b/docs/examples/1.8.x/server-python/examples/account/list-identities.md new file mode 100644 index 0000000000..aeb23be747 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-identities.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_identities( + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/list-logs.md b/docs/examples/1.8.x/server-python/examples/account/list-logs.md new file mode 100644 index 0000000000..67d193d186 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-logs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_logs( + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-python/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..72a392465a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_mfa_factors() diff --git a/docs/examples/1.8.x/server-python/examples/account/list-sessions.md b/docs/examples/1.8.x/server-python/examples/account/list-sessions.md new file mode 100644 index 0000000000..c553a7bce2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_sessions() diff --git a/docs/examples/1.8.x/server-python/examples/account/update-email.md b/docs/examples/1.8.x/server-python/examples/account/update-email.md new file mode 100644 index 0000000000..14de4fd41e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_email( + email = 'email@example.com', + password = 'password' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..7083d09642 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa( + mfa = False +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..0146083030 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.update_magic_url_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..d53607fe10 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_authenticator( + type = AuthenticatorType.TOTP, + otp = '<OTP>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-python/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..cfc58c58a2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_challenge( + challenge_id = '<CHALLENGE_ID>', + otp = '<OTP>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..51718eb03a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-python/examples/account/update-name.md b/docs/examples/1.8.x/server-python/examples/account/update-name.md new file mode 100644 index 0000000000..534a94e8bb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-name.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_name( + name = '<NAME>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-password.md b/docs/examples/1.8.x/server-python/examples/account/update-password.md new file mode 100644 index 0000000000..3c072e32d7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_password( + password = '', + old_password = 'password' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-python/examples/account/update-phone-session.md new file mode 100644 index 0000000000..52e77233a6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.update_phone_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-python/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..bcc57dee71 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_phone_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-phone.md b/docs/examples/1.8.x/server-python/examples/account/update-phone.md new file mode 100644 index 0000000000..a2cb7d3c83 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_phone( + phone = '+12065550100', + password = 'password' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-prefs.md b/docs/examples/1.8.x/server-python/examples/account/update-prefs.md new file mode 100644 index 0000000000..e2ac7a28c1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_prefs( + prefs = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-recovery.md b/docs/examples/1.8.x/server-python/examples/account/update-recovery.md new file mode 100644 index 0000000000..ed140abc0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_recovery( + user_id = '<USER_ID>', + secret = '<SECRET>', + password = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-session.md b/docs/examples/1.8.x/server-python/examples/account/update-session.md new file mode 100644 index 0000000000..abee773edc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-status.md b/docs/examples/1.8.x/server-python/examples/account/update-status.md new file mode 100644 index 0000000000..a5272f09de --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-status.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_status() diff --git a/docs/examples/1.8.x/server-python/examples/account/update-verification.md b/docs/examples/1.8.x/server-python/examples/account/update-verification.md new file mode 100644 index 0000000000..fbc7af5302 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-python/examples/avatars/get-browser.md new file mode 100644 index 0000000000..ff11b8b46f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Browser + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_browser( + code = Browser.AVANT_BROWSER, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-python/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..286f4d346c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import CreditCard + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_credit_card( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-python/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..f034ea41f3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_favicon( + url = 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-python/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6365a78b47 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Flag + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_flag( + code = Flag.AFGHANISTAN, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-image.md b/docs/examples/1.8.x/server-python/examples/avatars/get-image.md new file mode 100644 index 0000000000..9272c4d8fb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_image( + url = 'https://example.com', + width = 0, # optional + height = 0 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-python/examples/avatars/get-initials.md new file mode 100644 index 0000000000..2729ff5133 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_initials( + name = '<NAME>', # optional + width = 0, # optional + height = 0, # optional + background = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..3fb76a7f7c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_qr( + text = '<TEXT>', + size = 1, # optional + margin = 0, # optional + download = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..f12f446d30 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-collection.md b/docs/examples/1.8.x/server-python/examples/databases/create-collection.md new file mode 100644 index 0000000000..596d4a9383 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + document_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..8fd59e694f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-document.md b/docs/examples/1.8.x/server-python/examples/databases/create-document.md new file mode 100644 index 0000000000..1a8500b0f2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-document.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases(client) + +result = databases.create_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md new file mode 100644 index 0000000000..27ad6e8aa8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..230567aa46 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..de1ceb9f1f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..53305c8d4e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-index.md b/docs/examples/1.8.x/server-python/examples/databases/create-index.md new file mode 100644 index 0000000000..f7bb455d07 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + type = IndexType.KEY, + attributes = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..92e8b0f86a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..a7f424b22c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..6c8f4dc5bb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-relationship-attribute.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + related_collection_id = '<RELATED_COLLECTION_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..dc434cccaf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..af375733dd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create.md b/docs/examples/1.8.x/server-python/examples/databases/create.md new file mode 100644 index 0000000000..0492203e4c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..397bdd4bde --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.decrement_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..e1c4eecd01 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-python/examples/databases/delete-collection.md new file mode 100644 index 0000000000..02f1e1c536 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-document.md b/docs/examples/1.8.x/server-python/examples/databases/delete-document.md new file mode 100644 index 0000000000..57f8b3bd9d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.delete_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-python/examples/databases/delete-documents.md new file mode 100644 index 0000000000..a315f0c200 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-index.md b/docs/examples/1.8.x/server-python/examples/databases/delete-index.md new file mode 100644 index 0000000000..006006421d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete.md b/docs/examples/1.8.x/server-python/examples/databases/delete.md new file mode 100644 index 0000000000..be64e8c628 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/get-attribute.md new file mode 100644 index 0000000000..dcdb0a6ea9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-collection.md b/docs/examples/1.8.x/server-python/examples/databases/get-collection.md new file mode 100644 index 0000000000..0833b4fd7e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-document.md b/docs/examples/1.8.x/server-python/examples/databases/get-document.md new file mode 100644 index 0000000000..aff5008fa0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-document.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.get_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-index.md b/docs/examples/1.8.x/server-python/examples/databases/get-index.md new file mode 100644 index 0000000000..6971683072 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get.md b/docs/examples/1.8.x/server-python/examples/databases/get.md new file mode 100644 index 0000000000..c8191a3777 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..d5700e0b30 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.increment_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-python/examples/databases/list-attributes.md new file mode 100644 index 0000000000..c97a5ced64 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_attributes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-collections.md b/docs/examples/1.8.x/server-python/examples/databases/list-collections.md new file mode 100644 index 0000000000..17d0a3d878 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_collections( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-documents.md b/docs/examples/1.8.x/server-python/examples/databases/list-documents.md new file mode 100644 index 0000000000..8b450cd020 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.list_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-python/examples/databases/list-indexes.md new file mode 100644 index 0000000000..1457151a4e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_indexes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list.md b/docs/examples/1.8.x/server-python/examples/databases/list.md new file mode 100644 index 0000000000..58336c9f89 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..a0f72a49fb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-collection.md b/docs/examples/1.8.x/server-python/examples/databases/update-collection.md new file mode 100644 index 0000000000..2e5be50581 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + document_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..29bc6be4d1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-document.md b/docs/examples/1.8.x/server-python/examples/databases/update-document.md new file mode 100644 index 0000000000..9ef6527934 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-document.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.update_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-documents.md b/docs/examples/1.8.x/server-python/examples/databases/update-documents.md new file mode 100644 index 0000000000..5a50d1a912 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..c833789a37 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..6186a72a66 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..68cb7d7929 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..05c6bfe915 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..550d3af641 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..3b6c8e93e9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-relationship-attribute.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..5b66fb015c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..4a6202760f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update.md b/docs/examples/1.8.x/server-python/examples/databases/update.md new file mode 100644 index 0000000000..35d2c0cc40 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md new file mode 100644 index 0000000000..8711e442c5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases(client) + +result = databases.upsert_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..79888c8be3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.upsert_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-deployment.md new file mode 100644 index 0000000000..0774005729 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_deployment( + function_id = '<FUNCTION_ID>', + code = InputFile.from_path('file.png'), + activate = False, + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..79315e4a1c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_duplicate_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + build_id = '<BUILD_ID>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md new file mode 100644 index 0000000000..b41c7e376c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.create_execution( + function_id = '<FUNCTION_ID>', + body = '<BODY>', # optional + async = False, # optional + path = '<PATH>', # optional + method = ExecutionMethod.GET, # optional + headers = {}, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..6083cc1cb3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_template_deployment( + function_id = '<FUNCTION_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + version = '<VERSION>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-variable.md b/docs/examples/1.8.x/server-python/examples/functions/create-variable.md new file mode 100644 index 0000000000..2089830eff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_variable( + function_id = '<FUNCTION_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..4004baec27 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_vcs_deployment( + function_id = '<FUNCTION_ID>', + type = VCSDeploymentType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create.md b/docs/examples/1.8.x/server-python/examples/functions/create.md new file mode 100644 index 0000000000..8758e27e50 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = .NODE_14_5, + execute = ["any"], # optional + events = [], # optional + schedule = '', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..f874b2d270 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-python/examples/functions/delete-execution.md new file mode 100644 index 0000000000..df7ce7cb5b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-python/examples/functions/delete-variable.md new file mode 100644 index 0000000000..a6e3dc853c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete.md b/docs/examples/1.8.x/server-python/examples/functions/delete.md new file mode 100644 index 0000000000..ed2fef76c7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-python/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..1b0673c468 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-deployment-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_deployment_download( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/get-deployment.md new file mode 100644 index 0000000000..59a1374e0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-execution.md b/docs/examples/1.8.x/server-python/examples/functions/get-execution.md new file mode 100644 index 0000000000..a299f35195 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.get_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-variable.md b/docs/examples/1.8.x/server-python/examples/functions/get-variable.md new file mode 100644 index 0000000000..629948e909 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get.md b/docs/examples/1.8.x/server-python/examples/functions/get.md new file mode 100644 index 0000000000..eeab5a556b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-python/examples/functions/list-deployments.md new file mode 100644 index 0000000000..4eb92f60df --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_deployments( + function_id = '<FUNCTION_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-executions.md b/docs/examples/1.8.x/server-python/examples/functions/list-executions.md new file mode 100644 index 0000000000..300fc0e51d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.list_executions( + function_id = '<FUNCTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-python/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..9c89a36f0c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_runtimes() diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-python/examples/functions/list-specifications.md new file mode 100644 index 0000000000..d7d0036d35 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_specifications() diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-variables.md b/docs/examples/1.8.x/server-python/examples/functions/list-variables.md new file mode 100644 index 0000000000..ebc19c5ba4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_variables( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list.md b/docs/examples/1.8.x/server-python/examples/functions/list.md new file mode 100644 index 0000000000..b1d696d25a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-python/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..6c6a8bf121 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_deployment_status( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..da14309177 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_function_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update-variable.md b/docs/examples/1.8.x/server-python/examples/functions/update-variable.md new file mode 100644 index 0000000000..f8bcc0376c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', # optional + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update.md b/docs/examples/1.8.x/server-python/examples/functions/update.md new file mode 100644 index 0000000000..64ee39b29d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update.md @@ -0,0 +1,30 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = .NODE_14_5, # optional + execute = ["any"], # optional + events = [], # optional + schedule = '', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/graphql/mutation.md b/docs/examples/1.8.x/server-python/examples/graphql/mutation.md new file mode 100644 index 0000000000..189892a4ad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql(client) + +result = graphql.mutation( + query = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/graphql/query.md b/docs/examples/1.8.x/server-python/examples/graphql/query.md new file mode 100644 index 0000000000..585a5029b5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/graphql/query.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql(client) + +result = graphql.query( + query = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-python/examples/health/get-antivirus.md new file mode 100644 index 0000000000..2b621472ee --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_antivirus() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-cache.md b/docs/examples/1.8.x/server-python/examples/health/get-cache.md new file mode 100644 index 0000000000..595c4bf0a5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-cache.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_cache() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-certificate.md b/docs/examples/1.8.x/server-python/examples/health/get-certificate.md new file mode 100644 index 0000000000..5b3e2c0ad3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_certificate( + domain = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-d-b.md b/docs/examples/1.8.x/server-python/examples/health/get-d-b.md new file mode 100644 index 0000000000..47c7bd8efb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_db() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-python/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..5362a2d02a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-failed-jobs.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.health import Health +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_failed_jobs( + name = .V1_DATABASE, + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-python/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..e5115d06b8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_pub_sub() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..18ed8e3023 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_builds( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..b0a29e2d5b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_certificates( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..491d1f7c35 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_databases( + name = '<NAME>', # optional + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..fa860c6111 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_deletes( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..d4ca9388d9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_functions( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..1479f03634 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_logs( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..6835efeaa4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_mails( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..34cbad2f31 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_messaging( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..019db4e811 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_migrations( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..92aebc3c91 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_stats_resources( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..266ca828b1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_usage( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..df5e2d56db --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_webhooks( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-python/examples/health/get-storage-local.md new file mode 100644 index 0000000000..7d2ea44f45 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_storage_local() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-storage.md b/docs/examples/1.8.x/server-python/examples/health/get-storage.md new file mode 100644 index 0000000000..821d9f3986 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-storage.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_storage() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-time.md b/docs/examples/1.8.x/server-python/examples/health/get-time.md new file mode 100644 index 0000000000..907e96499b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-time.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_time() diff --git a/docs/examples/1.8.x/server-python/examples/health/get.md b/docs/examples/1.8.x/server-python/examples/health/get.md new file mode 100644 index 0000000000..c544fcc9b6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get() diff --git a/docs/examples/1.8.x/server-python/examples/locale/get.md b/docs/examples/1.8.x/server-python/examples/locale/get.md new file mode 100644 index 0000000000..6f2a877b0c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.get() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-codes.md b/docs/examples/1.8.x/server-python/examples/locale/list-codes.md new file mode 100644 index 0000000000..5f3e501fe1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_codes() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-continents.md b/docs/examples/1.8.x/server-python/examples/locale/list-continents.md new file mode 100644 index 0000000000..0aead81734 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_continents() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..f88e331f43 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries_eu() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-python/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..b1fdc1ae51 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries_phones() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-countries.md b/docs/examples/1.8.x/server-python/examples/locale/list-countries.md new file mode 100644 index 0000000000..0c5b23cdd1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-python/examples/locale/list-currencies.md new file mode 100644 index 0000000000..20009d6569 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_currencies() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-languages.md b/docs/examples/1.8.x/server-python/examples/locale/list-languages.md new file mode 100644 index 0000000000..1962a8399e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_languages() diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..b57fa00f23 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-email.md b/docs/examples/1.8.x/server-python/examples/messaging/create-email.md new file mode 100644 index 0000000000..8b4c9d267e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_email( + message_id = '<MESSAGE_ID>', + subject = '<SUBJECT>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + cc = [], # optional + bcc = [], # optional + attachments = [], # optional + draft = False, # optional + html = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..9c40eb7828 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + service_account_json = {}, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6703f6fdcc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + domain = '<DOMAIN>', # optional + is_eu_region = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..9315dcdd30 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-push.md b/docs/examples/1.8.x/server-python/examples/messaging/create-push.md new file mode 100644 index 0000000000..8671b56a39 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-push.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_push( + message_id = '<MESSAGE_ID>', + title = '<TITLE>', # optional + body = '<BODY>', # optional + topics = [], # optional + users = [], # optional + targets = [], # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '[ID1:ID2]', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = None, # optional + draft = False, # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..46ff54f166 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-python/examples/messaging/create-sms.md new file mode 100644 index 0000000000..d1c7b495b2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_sms( + message_id = '<MESSAGE_ID>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + draft = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..99914f0779 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-smtp-provider.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + host = '<HOST>', + port = 1, # optional + username = '<USERNAME>', # optional + password = '<PASSWORD>', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-python/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bc0c892b48 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result = messaging.create_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..aff09fe852 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..46ded71cdd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/create-topic.md new file mode 100644 index 0000000000..c1cb465e9b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', + subscribe = ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..4438563abf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..6ffded5b53 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..649e504c19 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete_provider( + provider_id = '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-python/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..c012a9ac97 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result = messaging.delete_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..76f9093a5f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete_topic( + topic_id = '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete.md b/docs/examples/1.8.x/server-python/examples/messaging/delete.md new file mode 100644 index 0000000000..0153ac90cb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete( + message_id = '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-message.md b/docs/examples/1.8.x/server-python/examples/messaging/get-message.md new file mode 100644 index 0000000000..3fadcff7d3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_message( + message_id = '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/get-provider.md new file mode 100644 index 0000000000..58e6228053 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_provider( + provider_id = '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-python/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..ca997f21f0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/get-topic.md new file mode 100644 index 0000000000..c238a98afe --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_topic( + topic_id = '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..f28c3e506f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_message_logs( + message_id = '<MESSAGE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-python/examples/messaging/list-messages.md new file mode 100644 index 0000000000..211649d5fb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_messages( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..da87e5939b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_provider_logs( + provider_id = '<PROVIDER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-python/examples/messaging/list-providers.md new file mode 100644 index 0000000000..03e5c4ebbc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_providers( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..df8ec72911 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_subscriber_logs( + subscriber_id = '<SUBSCRIBER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-python/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..f949b408e5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_subscribers( + topic_id = '<TOPIC_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-python/examples/messaging/list-targets.md new file mode 100644 index 0000000000..786ee42b19 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_targets( + message_id = '<MESSAGE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..f8a3995295 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_topic_logs( + topic_id = '<TOPIC_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-python/examples/messaging/list-topics.md new file mode 100644 index 0000000000..1c2cefc9cd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_topics( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..f695b61b8c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-email.md b/docs/examples/1.8.x/server-python/examples/messaging/update-email.md new file mode 100644 index 0000000000..5731d5f29a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_email( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + subject = '<SUBJECT>', # optional + content = '<CONTENT>', # optional + draft = False, # optional + html = False, # optional + cc = [], # optional + bcc = [], # optional + scheduled_at = '', # optional + attachments = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..0119d71b4f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + service_account_json = {} # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..039475ffdc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + api_key = '<API_KEY>', # optional + domain = '<DOMAIN>', # optional + is_eu_region = False, # optional + enabled = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..c5bd057912 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-push.md b/docs/examples/1.8.x/server-python/examples/messaging/update-push.md new file mode 100644 index 0000000000..e3bb02e71f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-push.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_push( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + title = '<TITLE>', # optional + body = '<BODY>', # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '[ID1:ID2]', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = None, # optional + draft = False, # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..fc0a44d6cd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-python/examples/messaging/update-sms.md new file mode 100644 index 0000000000..2eec4e215b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_sms( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + content = '<CONTENT>', # optional + draft = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..80019aad40 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-smtp-provider.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + host = '<HOST>', # optional + port = 1, # optional + username = '<USERNAME>', # optional + password = '<PASSWORD>', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..193a26f830 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..159f95490e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/update-topic.md new file mode 100644 index 0000000000..721f160642 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', # optional + subscribe = ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..b80c55b300 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..b25f416cef --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-deployment.md new file mode 100644 index 0000000000..de6472c4b0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_deployment( + site_id = '<SITE_ID>', + code = InputFile.from_path('file.png'), + activate = False, + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..d79ab9d3d1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_duplicate_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..ac05f9e663 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_template_deployment( + site_id = '<SITE_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + version = '<VERSION>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-variable.md b/docs/examples/1.8.x/server-python/examples/sites/create-variable.md new file mode 100644 index 0000000000..739beff61f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_variable( + site_id = '<SITE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..089e6c8141 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_vcs_deployment( + site_id = '<SITE_ID>', + type = VCSDeploymentType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create.md b/docs/examples/1.8.x/server-python/examples/sites/create.md new file mode 100644 index 0000000000..4950cd2116 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create.md @@ -0,0 +1,32 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = .ANALOG, + build_runtime = .NODE_14_5, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + adapter = .STATIC, # optional + installation_id = '<INSTALLATION_ID>', # optional + fallback_file = '<FALLBACK_FILE>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..029730ae3f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete-log.md b/docs/examples/1.8.x/server-python/examples/sites/delete-log.md new file mode 100644 index 0000000000..0b516e6840 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-python/examples/sites/delete-variable.md new file mode 100644 index 0000000000..c078813b4a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete.md b/docs/examples/1.8.x/server-python/examples/sites/delete.md new file mode 100644 index 0000000000..60670e63e0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-python/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..d6af564217 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment_download( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/get-deployment.md new file mode 100644 index 0000000000..c4ee1de904 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-log.md b/docs/examples/1.8.x/server-python/examples/sites/get-log.md new file mode 100644 index 0000000000..ae5d8ac2df --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-variable.md b/docs/examples/1.8.x/server-python/examples/sites/get-variable.md new file mode 100644 index 0000000000..7f5f0f6480 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get.md b/docs/examples/1.8.x/server-python/examples/sites/get.md new file mode 100644 index 0000000000..f9532a0e1a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-python/examples/sites/list-deployments.md new file mode 100644 index 0000000000..15ec24d232 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_deployments( + site_id = '<SITE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-python/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..6e3764695e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_frameworks() diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-logs.md b/docs/examples/1.8.x/server-python/examples/sites/list-logs.md new file mode 100644 index 0000000000..d3a9a193c1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_logs( + site_id = '<SITE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-python/examples/sites/list-specifications.md new file mode 100644 index 0000000000..93b713c4b6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_specifications() diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-variables.md b/docs/examples/1.8.x/server-python/examples/sites/list-variables.md new file mode 100644 index 0000000000..5ff78e6a1a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_variables( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list.md b/docs/examples/1.8.x/server-python/examples/sites/list.md new file mode 100644 index 0000000000..1b344e1d0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-python/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..492ee4f747 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_deployment_status( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..69014bbbcd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_site_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update-variable.md b/docs/examples/1.8.x/server-python/examples/sites/update-variable.md new file mode 100644 index 0000000000..973f7f2e65 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', # optional + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update.md b/docs/examples/1.8.x/server-python/examples/sites/update.md new file mode 100644 index 0000000000..7d2d2865a4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = .ANALOG, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + build_runtime = .NODE_14_5, # optional + adapter = .STATIC, # optional + fallback_file = '<FALLBACK_FILE>', # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md new file mode 100644 index 0000000000..9672782b5c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.create_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = .NONE, # optional + encryption = False, # optional + antivirus = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/create-file.md b/docs/examples/1.8.x/server-python/examples/storage/create-file.md new file mode 100644 index 0000000000..6e57284b85 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/create-file.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.create_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + file = InputFile.from_path('file.png'), + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..dd8e8ebc43 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.delete_bucket( + bucket_id = '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/delete-file.md b/docs/examples/1.8.x/server-python/examples/storage/delete-file.md new file mode 100644 index 0000000000..17bc251e50 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.delete_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e5eeb4c097 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.get_bucket( + bucket_id = '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-python/examples/storage/get-file-download.md new file mode 100644 index 0000000000..411abf8c79 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_download( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-python/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..47e3f23b55 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_preview( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + width = 0, # optional + height = 0, # optional + gravity = ImageGravity.CENTER, # optional + quality = -1, # optional + border_width = 0, # optional + border_color = '', # optional + border_radius = 0, # optional + opacity = 0, # optional + rotation = -360, # optional + background = '', # optional + output = ImageFormat.JPG, # optional + token = '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-python/examples/storage/get-file-view.md new file mode 100644 index 0000000000..85cbad7902 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_view( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file.md b/docs/examples/1.8.x/server-python/examples/storage/get-file.md new file mode 100644 index 0000000000..461543e3fd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-python/examples/storage/list-buckets.md new file mode 100644 index 0000000000..51a1ae6836 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.list_buckets( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/list-files.md b/docs/examples/1.8.x/server-python/examples/storage/list-files.md new file mode 100644 index 0000000000..4034bd477d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/list-files.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.list_files( + bucket_id = '<BUCKET_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md new file mode 100644 index 0000000000..f2e741a5aa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.update_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = .NONE, # optional + encryption = False, # optional + antivirus = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/update-file.md b/docs/examples/1.8.x/server-python/examples/storage/update-file.md new file mode 100644 index 0000000000..cf1e5779bb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/update-file.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.update_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + name = '<NAME>', # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..cfbaa3b0ee --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..a9f76b5e5f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md new file mode 100644 index 0000000000..73ac0faad6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..2013c39fa0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md new file mode 100644 index 0000000000..a56a196093 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-index.md b/docs/examples/1.8.x/server-python/examples/tables/create-index.md new file mode 100644 index 0000000000..69086af0b0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + type = IndexType.KEY, + columns = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..d52b14bc5c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..b5c7ef56db --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..187271f887 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-row.md b/docs/examples/1.8.x/server-python/examples/tables/create-row.md new file mode 100644 index 0000000000..8850a974b8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-row.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables(client) + +result = tables.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-rows.md b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md new file mode 100644 index 0000000000..3fae165081 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md new file mode 100644 index 0000000000..1308fea2ad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md new file mode 100644 index 0000000000..f15c3e0574 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create.md b/docs/examples/1.8.x/server-python/examples/tables/create.md new file mode 100644 index 0000000000..3a02843c4d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..bf027d6e76 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-column.md b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md new file mode 100644 index 0000000000..cf2dd6d5e5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-index.md b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md new file mode 100644 index 0000000000..5f78d1ce1d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-row.md b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md new file mode 100644 index 0000000000..40a8b09fcf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md new file mode 100644 index 0000000000..236aea1c9b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete.md b/docs/examples/1.8.x/server-python/examples/tables/delete.md new file mode 100644 index 0000000000..de48bfc2b5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-column.md b/docs/examples/1.8.x/server-python/examples/tables/get-column.md new file mode 100644 index 0000000000..4bd4617142 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-index.md b/docs/examples/1.8.x/server-python/examples/tables/get-index.md new file mode 100644 index 0000000000..cf88017fbe --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-row.md b/docs/examples/1.8.x/server-python/examples/tables/get-row.md new file mode 100644 index 0000000000..25fefb23fd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get.md b/docs/examples/1.8.x/server-python/examples/tables/get.md new file mode 100644 index 0000000000..789410cfb7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..cfb923029e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-columns.md b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md new file mode 100644 index 0000000000..d9c5b16468 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0b0bb585e7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-rows.md b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md new file mode 100644 index 0000000000..2ece6f6cf7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list.md b/docs/examples/1.8.x/server-python/examples/tables/list.md new file mode 100644 index 0000000000..55a99e996d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..1bc7a4afac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..157ff44a7b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md new file mode 100644 index 0000000000..8b9e4cad36 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..b46971beac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md new file mode 100644 index 0000000000..243a26f0aa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..99b55c17a7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..2fb470ae6e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..35a307c7e2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-row.md b/docs/examples/1.8.x/server-python/examples/tables/update-row.md new file mode 100644 index 0000000000..4a71fc97f2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-rows.md b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md new file mode 100644 index 0000000000..a834346678 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md new file mode 100644 index 0000000000..252c26433e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md new file mode 100644 index 0000000000..235e2f3bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update.md b/docs/examples/1.8.x/server-python/examples/tables/update.md new file mode 100644 index 0000000000..c567bd5500 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md new file mode 100644 index 0000000000..e418708bc3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables(client) + +result = tables.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..85c2e94d69 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/create-membership.md b/docs/examples/1.8.x/server-python/examples/teams/create-membership.md new file mode 100644 index 0000000000..cb3bf73195 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.create_membership( + team_id = '<TEAM_ID>', + roles = [], + email = 'email@example.com', # optional + user_id = '<USER_ID>', # optional + phone = '+12065550100', # optional + url = 'https://example.com', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/create.md b/docs/examples/1.8.x/server-python/examples/teams/create.md new file mode 100644 index 0000000000..f623151b27 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.create( + team_id = '<TEAM_ID>', + name = '<NAME>', + roles = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-python/examples/teams/delete-membership.md new file mode 100644 index 0000000000..6fb218266f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.delete_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/delete.md b/docs/examples/1.8.x/server-python/examples/teams/delete.md new file mode 100644 index 0000000000..056114bfad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.delete( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/get-membership.md b/docs/examples/1.8.x/server-python/examples/teams/get-membership.md new file mode 100644 index 0000000000..3c028a5c7e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-python/examples/teams/get-prefs.md new file mode 100644 index 0000000000..8d645897c6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get_prefs( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/get.md b/docs/examples/1.8.x/server-python/examples/teams/get.md new file mode 100644 index 0000000000..55f172eadd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-python/examples/teams/list-memberships.md new file mode 100644 index 0000000000..6e6f15a284 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.list_memberships( + team_id = '<TEAM_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/list.md b/docs/examples/1.8.x/server-python/examples/teams/list.md new file mode 100644 index 0000000000..bf91a50744 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-python/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9c08421579 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_membership_status( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-membership.md b/docs/examples/1.8.x/server-python/examples/teams/update-membership.md new file mode 100644 index 0000000000..db20c5aaae --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + roles = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-name.md b/docs/examples/1.8.x/server-python/examples/teams/update-name.md new file mode 100644 index 0000000000..160b496932 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_name( + team_id = '<TEAM_ID>', + name = '<NAME>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-python/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e82da1b64f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_prefs( + team_id = '<TEAM_ID>', + prefs = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-python/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..f835a0ea8d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.create_file_token( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + expire = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/delete.md b/docs/examples/1.8.x/server-python/examples/tokens/delete.md new file mode 100644 index 0000000000..47619321ff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.delete( + token_id = '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/get.md b/docs/examples/1.8.x/server-python/examples/tokens/get.md new file mode 100644 index 0000000000..0d6abb81d7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.get( + token_id = '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/list.md b/docs/examples/1.8.x/server-python/examples/tokens/list.md new file mode 100644 index 0000000000..2694650ed3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/list.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.list( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/update.md b/docs/examples/1.8.x/server-python/examples/tokens/update.md new file mode 100644 index 0000000000..18b04445cc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.update( + token_id = '<TOKEN_ID>', + expire = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-python/examples/users/create-argon2user.md new file mode 100644 index 0000000000..5e95cc26ac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_argon2_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-python/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..d3d9e21586 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_bcrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..bed6c483e0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_jwt( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>', # optional + duration = 0 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..b1cbb53f23 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_md5_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..64a87c05ff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..33f65f44d9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_ph_pass_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..5b4c8f831a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_sha_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_version = PasswordHash.SHA1, # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..9d644ce4ca --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_scrypt_modified_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_salt_separator = '<PASSWORD_SALT_SEPARATOR>', + password_signer_key = '<PASSWORD_SIGNER_KEY>', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..f442ab9d3e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_scrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_cpu = None, + password_memory = None, + password_parallel = None, + password_length = None, + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-session.md b/docs/examples/1.8.x/server-python/examples/users/create-session.md new file mode 100644 index 0000000000..7e4c49fc95 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_session( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-target.md b/docs/examples/1.8.x/server-python/examples/users/create-target.md new file mode 100644 index 0000000000..dfa64ac757 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-target.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.enums import MessagingProviderType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + provider_type = MessagingProviderType.EMAIL, + identifier = '<IDENTIFIER>', + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-token.md b/docs/examples/1.8.x/server-python/examples/users/create-token.md new file mode 100644 index 0000000000..b40658c312 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_token( + user_id = '<USER_ID>', + length = 4, # optional + expire = 60 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create.md b/docs/examples/1.8.x/server-python/examples/users/create.md new file mode 100644 index 0000000000..4c51a3fffb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create( + user_id = '<USER_ID>', + email = 'email@example.com', # optional + phone = '+12065550100', # optional + password = '', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-identity.md b/docs/examples/1.8.x/server-python/examples/users/delete-identity.md new file mode 100644 index 0000000000..412fbd393a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_identity( + identity_id = '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..6472498344 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_mfa_authenticator( + user_id = '<USER_ID>', + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-session.md b/docs/examples/1.8.x/server-python/examples/users/delete-session.md new file mode 100644 index 0000000000..815a96ed37 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_session( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-python/examples/users/delete-sessions.md new file mode 100644 index 0000000000..2dde88f471 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_sessions( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-target.md b/docs/examples/1.8.x/server-python/examples/users/delete-target.md new file mode 100644 index 0000000000..287f5a26cf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-target.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete.md b/docs/examples/1.8.x/server-python/examples/users/delete.md new file mode 100644 index 0000000000..7032b0f81e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..bca43b08ec --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get-prefs.md b/docs/examples/1.8.x/server-python/examples/users/get-prefs.md new file mode 100644 index 0000000000..ec9d363f8d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_prefs( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get-target.md b/docs/examples/1.8.x/server-python/examples/users/get-target.md new file mode 100644 index 0000000000..3b80b1ff7f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get-target.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get.md b/docs/examples/1.8.x/server-python/examples/users/get.md new file mode 100644 index 0000000000..267086a3df --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-identities.md b/docs/examples/1.8.x/server-python/examples/users/list-identities.md new file mode 100644 index 0000000000..0fc7811a3f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-identities.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_identities( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-logs.md b/docs/examples/1.8.x/server-python/examples/users/list-logs.md new file mode 100644 index 0000000000..6cbbe498cb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_logs( + user_id = '<USER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-memberships.md b/docs/examples/1.8.x/server-python/examples/users/list-memberships.md new file mode 100644 index 0000000000..c0d2f2a468 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_memberships( + user_id = '<USER_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-python/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..a2b59895e8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_mfa_factors( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-sessions.md b/docs/examples/1.8.x/server-python/examples/users/list-sessions.md new file mode 100644 index 0000000000..77b04c935e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_sessions( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-targets.md b/docs/examples/1.8.x/server-python/examples/users/list-targets.md new file mode 100644 index 0000000000..14107fa296 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-targets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_targets( + user_id = '<USER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list.md b/docs/examples/1.8.x/server-python/examples/users/list.md new file mode 100644 index 0000000000..778f33935d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-python/examples/users/update-email-verification.md new file mode 100644 index 0000000000..2605861416 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_email_verification( + user_id = '<USER_ID>', + email_verification = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-email.md b/docs/examples/1.8.x/server-python/examples/users/update-email.md new file mode 100644 index 0000000000..c4a468e234 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_email( + user_id = '<USER_ID>', + email = 'email@example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-labels.md b/docs/examples/1.8.x/server-python/examples/users/update-labels.md new file mode 100644 index 0000000000..b9af53a50e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-labels.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_labels( + user_id = '<USER_ID>', + labels = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c0990e1ef7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-mfa.md b/docs/examples/1.8.x/server-python/examples/users/update-mfa.md new file mode 100644 index 0000000000..9b35701185 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_mfa( + user_id = '<USER_ID>', + mfa = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-name.md b/docs/examples/1.8.x/server-python/examples/users/update-name.md new file mode 100644 index 0000000000..1e328b4c48 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_name( + user_id = '<USER_ID>', + name = '<NAME>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-password.md b/docs/examples/1.8.x/server-python/examples/users/update-password.md new file mode 100644 index 0000000000..d104184cad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_password( + user_id = '<USER_ID>', + password = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-python/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..1d2656c3f1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_phone_verification( + user_id = '<USER_ID>', + phone_verification = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-phone.md b/docs/examples/1.8.x/server-python/examples/users/update-phone.md new file mode 100644 index 0000000000..14826bb54c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_phone( + user_id = '<USER_ID>', + number = '+12065550100' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-prefs.md b/docs/examples/1.8.x/server-python/examples/users/update-prefs.md new file mode 100644 index 0000000000..76903b7611 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_prefs( + user_id = '<USER_ID>', + prefs = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-status.md b/docs/examples/1.8.x/server-python/examples/users/update-status.md new file mode 100644 index 0000000000..49c0516ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_status( + user_id = '<USER_ID>', + status = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-target.md b/docs/examples/1.8.x/server-python/examples/users/update-target.md new file mode 100644 index 0000000000..119c5fab88 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-target.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + identifier = '<IDENTIFIER>', # optional + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..2079b045d1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,6 @@ +POST /v1/account/sessions/anonymous HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..8aee0e5b15 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md new file mode 100644 index 0000000000..98c5c9b454 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md @@ -0,0 +1,11 @@ +POST /v1/account/tokens/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a8da4695c3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md @@ -0,0 +1,6 @@ +POST /v1/account/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..a3db43516a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,12 @@ +POST /v1/account/tokens/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..8d6b52b877 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..9a84c0ef69 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,9 @@ +POST /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "factor": "email" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..797824d5d7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..dd1dd3ec5e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md @@ -0,0 +1,4 @@ +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md new file mode 100644 index 0000000000..eef1021d9e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md @@ -0,0 +1,10 @@ +POST /v1/account/tokens/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "phone": "+12065550100" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..d161e580ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md @@ -0,0 +1,8 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..c195b96a5e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +POST /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-session.md new file mode 100644 index 0000000000..18e3b1acdd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..1185d3a875 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md @@ -0,0 +1,11 @@ +POST /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create.md b/docs/examples/1.8.x/server-rest/examples/account/create.md new file mode 100644 index 0000000000..f546c07de5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create.md @@ -0,0 +1,12 @@ +POST /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": , + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..edb036a593 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md @@ -0,0 +1,8 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..de58948195 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..9454a84913 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..97931c12e5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..81edee5234 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..13a0b74d8f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-session.md b/docs/examples/1.8.x/server-rest/examples/account/get-session.md new file mode 100644 index 0000000000..9417755b04 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get-session.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get.md b/docs/examples/1.8.x/server-rest/examples/account/get.md new file mode 100644 index 0000000000..023a6d116f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get.md @@ -0,0 +1,6 @@ +GET /v1/account HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..65edceb8d6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md @@ -0,0 +1,6 @@ +GET /v1/account/identities HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..71e2e138ef --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md @@ -0,0 +1,6 @@ +GET /v1/account/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..217ec6cb30 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..7bff23f25b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-email.md b/docs/examples/1.8.x/server-rest/examples/account/update-email.md new file mode 100644 index 0000000000..fc3baaf4a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-email.md @@ -0,0 +1,12 @@ +PATCH /v1/account/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..803c47a857 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +PATCH /v1/account/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "mfa": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3238322e0f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9d3e5dceea --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,11 @@ +PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "otp": "<OTP>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ddc27ae334 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +PUT /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "challengeId": "<CHALLENGE_ID>", + "otp": "<OTP>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e4ab8abb3b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +PATCH /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-name.md b/docs/examples/1.8.x/server-rest/examples/account/update-name.md new file mode 100644 index 0000000000..f2f7caa204 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-name.md @@ -0,0 +1,11 @@ +PATCH /v1/account/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-password.md b/docs/examples/1.8.x/server-rest/examples/account/update-password.md new file mode 100644 index 0000000000..4f69b9ab3f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-password.md @@ -0,0 +1,12 @@ +PATCH /v1/account/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f1bc27d201 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..ee6f5a68ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..bbe602a181 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md @@ -0,0 +1,12 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..aeabc2b68f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..054aacc8ed --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>", + "password": +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-session.md new file mode 100644 index 0000000000..9b2ba0e4a7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-session.md @@ -0,0 +1,8 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-status.md b/docs/examples/1.8.x/server-rest/examples/account/update-status.md new file mode 100644 index 0000000000..8a3e01db0b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-status.md @@ -0,0 +1,8 @@ +PATCH /v1/account/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..0c5ed8b55d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..3f18fa0d1e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md @@ -0,0 +1,7 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..59a38fe8f3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,7 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..7a7c189da1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..b4cd119359 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md @@ -0,0 +1,7 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..ca6b5105c3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md @@ -0,0 +1,7 @@ +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..eb90447158 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md @@ -0,0 +1,7 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..77f7a3d382 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md @@ -0,0 +1,7 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..8ae6c2d9ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md new file mode 100644 index 0000000000..ea298e3706 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "collectionId": "<COLLECTION_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..6ec4b332a5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..a5c25315c2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "documentId": "<DOCUMENT_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md new file mode 100644 index 0000000000..63503ebaaa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "documents": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..0fb7aa2814 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..ba033a02ce --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..ee8cb7497f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md new file mode 100644 index 0000000000..6d9b486ed6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "attributes": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..721f10e0c7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..61378e6780 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..c519a4a494 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedCollectionId": "<RELATED_COLLECTION_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..7a5eafdf2a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..ea4d76ce06 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create.md b/docs/examples/1.8.x/server-rest/examples/databases/create.md new file mode 100644 index 0000000000..dab52ff67c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create.md @@ -0,0 +1,12 @@ +POST /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..d569f8d7e6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8b7f1eee07 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md new file mode 100644 index 0000000000..153b3a2bdd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..ca093c9177 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md new file mode 100644 index 0000000000..49ab276fa6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md @@ -0,0 +1,10 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md new file mode 100644 index 0000000000..9c27a6fd4c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete.md b/docs/examples/1.8.x/server-rest/examples/databases/delete.md new file mode 100644 index 0000000000..19cf58549a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md new file mode 100644 index 0000000000..c4cd093de0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md new file mode 100644 index 0000000000..0e33fc4ef7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..b71ec4f83c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md new file mode 100644 index 0000000000..5aa5aa0fb2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get.md b/docs/examples/1.8.x/server-rest/examples/databases/get.md new file mode 100644 index 0000000000..7c43330625 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..8658cb0ee6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e829678007 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md new file mode 100644 index 0000000000..0cfdce9c8e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..0bc5c9b7f9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md new file mode 100644 index 0000000000..e65ba2483c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list.md b/docs/examples/1.8.x/server-rest/examples/databases/list.md new file mode 100644 index 0000000000..31db5cca0d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list.md @@ -0,0 +1,5 @@ +GET /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..7a2ae34ce9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md new file mode 100644 index 0000000000..4cba7f5230 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..c9685e6c89 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..19b25bdf45 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md new file mode 100644 index 0000000000..f2606e3a1f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..eece253459 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..47ef168090 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..bb35f3450c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..96290f4313 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..9e3cf7d4b5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..645e8f8ae4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..650b6f1b8b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..8409285677 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update.md b/docs/examples/1.8.x/server-rest/examples/databases/update.md new file mode 100644 index 0000000000..02efbf5270 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update.md @@ -0,0 +1,11 @@ +PUT /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md new file mode 100644 index 0000000000..7339c7e611 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md @@ -0,0 +1,9 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..1a24810a03 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md @@ -0,0 +1,7 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md new file mode 100644 index 0000000000..5d65eff5fd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="entrypoint" + +"<ENTRYPOINT>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="commands" + +"<COMMANDS>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..898117c117 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,11 @@ +POST /v1/functions/{functionId}/deployments/duplicate HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>", + "buildId": "<BUILD_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..5a4c7667cf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "body": "<BODY>", + "async": false, + "path": "<PATH>", + "method": "GET", + "headers": {}, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..656c2e2a27 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md @@ -0,0 +1,14 @@ +POST /v1/functions/{functionId}/deployments/template HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "version": "<VERSION>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md new file mode 100644 index 0000000000..7251a3a352 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md @@ -0,0 +1,12 @@ +POST /v1/functions/{functionId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..1b5267ca14 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md @@ -0,0 +1,12 @@ +POST /v1/functions/{functionId}/deployments/vcs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create.md b/docs/examples/1.8.x/server-rest/examples/functions/create.md new file mode 100644 index 0000000000..c5f364ad63 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create.md @@ -0,0 +1,27 @@ +POST /v1/functions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "functionId": "<FUNCTION_ID>", + "name": "<NAME>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..b70f282167 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md new file mode 100644 index 0000000000..fb26ae47aa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md new file mode 100644 index 0000000000..aa01835ae4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete.md b/docs/examples/1.8.x/server-rest/examples/functions/delete.md new file mode 100644 index 0000000000..9f9ab74019 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..9195d203ab --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md @@ -0,0 +1,6 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md new file mode 100644 index 0000000000..2557ca698e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..52e54c2a6c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md new file mode 100644 index 0000000000..2a01307b0d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get.md b/docs/examples/1.8.x/server-rest/examples/functions/get.md new file mode 100644 index 0000000000..062b7e67ec --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md new file mode 100644 index 0000000000..5b4dabc679 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..b0ac3076ab --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..762e47fbcb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md @@ -0,0 +1,5 @@ +GET /v1/functions/runtimes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md new file mode 100644 index 0000000000..989adc0576 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md @@ -0,0 +1,5 @@ +GET /v1/functions/specifications HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md new file mode 100644 index 0000000000..b46b69fb5f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/variables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list.md b/docs/examples/1.8.x/server-rest/examples/functions/list.md new file mode 100644 index 0000000000..318a2d56ed --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list.md @@ -0,0 +1,5 @@ +GET /v1/functions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..8788e21c2b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md @@ -0,0 +1,7 @@ +PATCH /v1/functions/{functionId}/deployments/{deploymentId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..1f89f35da0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md @@ -0,0 +1,10 @@ +PATCH /v1/functions/{functionId}/deployment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md new file mode 100644 index 0000000000..36ae244548 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md @@ -0,0 +1,12 @@ +PUT /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update.md b/docs/examples/1.8.x/server-rest/examples/functions/update.md new file mode 100644 index 0000000000..ee3b8b8c6d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update.md @@ -0,0 +1,26 @@ +PUT /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..7d58d77ede --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/query.md b/docs/examples/1.8.x/server-rest/examples/graphql/query.md new file mode 100644 index 0000000000..8b87cd9f33 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/graphql/query.md @@ -0,0 +1,13 @@ +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md new file mode 100644 index 0000000000..2acacb5a5f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md @@ -0,0 +1,5 @@ +GET /v1/health/anti-virus HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md new file mode 100644 index 0000000000..c98dcf8af1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md @@ -0,0 +1,5 @@ +GET /v1/health/cache HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md new file mode 100644 index 0000000000..9f4f5efee4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md @@ -0,0 +1,5 @@ +GET /v1/health/certificate HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md new file mode 100644 index 0000000000..9f1efb921b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md @@ -0,0 +1,5 @@ +GET /v1/health/db HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..b646b7923f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/failed/{name} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..d28025f719 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md @@ -0,0 +1,5 @@ +GET /v1/health/pubsub HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..d51b4d60b3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/builds HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..0f3c2f65fe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/certificates HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..ccc72c3404 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/databases HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..a4c5e15586 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/deletes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..a28dbf921c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/functions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..0c16e61757 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..82b6151af1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/mails HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..6082ec41bd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/messaging HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..c9687b3224 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/migrations HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..90eefe75fc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/stats-resources HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..663d39dd2f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/stats-usage HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..0843ad174f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/webhooks HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md new file mode 100644 index 0000000000..9047713439 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md @@ -0,0 +1,5 @@ +GET /v1/health/storage/local HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md new file mode 100644 index 0000000000..1d46ab179e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md @@ -0,0 +1,5 @@ +GET /v1/health/storage HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-time.md b/docs/examples/1.8.x/server-rest/examples/health/get-time.md new file mode 100644 index 0000000000..7661df5732 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-time.md @@ -0,0 +1,5 @@ +GET /v1/health/time HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get.md b/docs/examples/1.8.x/server-rest/examples/health/get.md new file mode 100644 index 0000000000..c64b480826 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get.md @@ -0,0 +1,5 @@ +GET /v1/health HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/get.md b/docs/examples/1.8.x/server-rest/examples/locale/get.md new file mode 100644 index 0000000000..7b300acb41 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/get.md @@ -0,0 +1,7 @@ +GET /v1/locale HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..336ac1477f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md @@ -0,0 +1,7 @@ +GET /v1/locale/codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..d99b138653 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md @@ -0,0 +1,7 @@ +GET /v1/locale/continents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..3c94877234 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..09619edb36 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..0f1be7e5df --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..c1e03ecae2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md @@ -0,0 +1,7 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..1e2a125985 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md @@ -0,0 +1,7 @@ +GET /v1/locale/languages HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..b6860358c1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md @@ -0,0 +1,17 @@ +POST /v1/messaging/providers/apns HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md new file mode 100644 index 0000000000..efec44982c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md @@ -0,0 +1,21 @@ +POST /v1/messaging/messages/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "cc": [], + "bcc": [], + "attachments": [], + "draft": false, + "html": false, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..ec885465a7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md @@ -0,0 +1,13 @@ +POST /v1/messaging/providers/fcm HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "serviceAccountJSON": {}, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..8d0eb33938 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,19 @@ +POST /v1/messaging/providers/mailgun HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "domain": "<DOMAIN>", + "isEuRegion": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..2877ff7b89 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/msg91 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md new file mode 100644 index 0000000000..6210273820 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md @@ -0,0 +1,28 @@ +POST /v1/messaging/messages/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "title": "<TITLE>", + "body": "<BODY>", + "topics": [], + "users": [], + "targets": [], + "data": {}, + "action": "<ACTION>", + "image": "[ID1:ID2]", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 0, + "draft": false, + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..a9f7c933dc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,17 @@ +POST /v1/messaging/providers/sendgrid HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md new file mode 100644 index 0000000000..f885563f6f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md @@ -0,0 +1,16 @@ +POST /v1/messaging/messages/sms HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "draft": false, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..bbb8e7d212 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md @@ -0,0 +1,23 @@ +POST /v1/messaging/providers/smtp HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "host": "<HOST>", + "port": 1, + "username": "<USERNAME>", + "password": "<PASSWORD>", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..2e61d50b5c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "subscriberId": "<SUBSCRIBER_ID>", + "targetId": "<TARGET_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..198ccae6f5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/telesign HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..2f2ce558a7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/textmagic HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md new file mode 100644 index 0000000000..a44af2764d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md @@ -0,0 +1,12 @@ +POST /v1/messaging/topics HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topicId": "<TOPIC_ID>", + "name": "<NAME>", + "subscribe": ["any"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..61fd63b52e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/twilio HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..16d1c6b594 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/vonage HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..e25c3dcc1c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/providers/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..b988897d60 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,9 @@ +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..3c5c8a9cdb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md new file mode 100644 index 0000000000..a918c2b6f8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/messages/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md new file mode 100644 index 0000000000..abe744e9c7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md new file mode 100644 index 0000000000..0d2ffe4eaa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md @@ -0,0 +1,5 @@ +GET /v1/messaging/providers/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..a1629d4546 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md new file mode 100644 index 0000000000..5d7efd06de --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..066970a9fb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages/{messageId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md new file mode 100644 index 0000000000..03a286c376 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..562264f48e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/providers/{providerId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md new file mode 100644 index 0000000000..43522ee34f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md @@ -0,0 +1,5 @@ +GET /v1/messaging/providers HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..f403362529 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/subscribers/{subscriberId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..a357f9dc3d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md new file mode 100644 index 0000000000..0b4f8caf6f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages/{messageId}/targets HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..80073b2165 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md new file mode 100644 index 0000000000..2835277aeb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..a398b186cb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md @@ -0,0 +1,16 @@ +PATCH /v1/messaging/providers/apns/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md new file mode 100644 index 0000000000..0ef5b89409 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md @@ -0,0 +1,20 @@ +PATCH /v1/messaging/messages/email/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "draft": false, + "html": false, + "cc": [], + "bcc": [], + "scheduledAt": , + "attachments": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..50e3a5400d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md @@ -0,0 +1,12 @@ +PATCH /v1/messaging/providers/fcm/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "serviceAccountJSON": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f05f0057e7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,18 @@ +PATCH /v1/messaging/providers/mailgun/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "apiKey": "<API_KEY>", + "domain": "<DOMAIN>", + "isEuRegion": false, + "enabled": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..1c88425fc1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/msg91/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md new file mode 100644 index 0000000000..adf269301c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md @@ -0,0 +1,27 @@ +PATCH /v1/messaging/messages/push/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "title": "<TITLE>", + "body": "<BODY>", + "data": {}, + "action": "<ACTION>", + "image": "[ID1:ID2]", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 0, + "draft": false, + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..28ffb526f8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,16 @@ +PATCH /v1/messaging/providers/sendgrid/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md new file mode 100644 index 0000000000..b5ad82d0f9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md @@ -0,0 +1,15 @@ +PATCH /v1/messaging/messages/sms/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "content": "<CONTENT>", + "draft": false, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..8e69659ce1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md @@ -0,0 +1,22 @@ +PATCH /v1/messaging/providers/smtp/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "host": "<HOST>", + "port": 1, + "username": "<USERNAME>", + "password": "<PASSWORD>", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..548d39dc92 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/telesign/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..724b0a4afe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/textmagic/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md new file mode 100644 index 0000000000..add0bf8ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md @@ -0,0 +1,11 @@ +PATCH /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "subscribe": ["any"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..38730383b1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/twilio/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..8c284c827f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/vonage/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md new file mode 100644 index 0000000000..554d2a5365 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md @@ -0,0 +1,35 @@ +POST /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="installCommand" + +"<INSTALL_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="buildCommand" + +"<BUILD_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="outputDirectory" + +"<OUTPUT_DIRECTORY>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..3da246715b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,10 @@ +POST /v1/sites/{siteId}/deployments/duplicate HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..e37819bfb2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md @@ -0,0 +1,14 @@ +POST /v1/sites/{siteId}/deployments/template HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "version": "<VERSION>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md new file mode 100644 index 0000000000..73217d198c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md @@ -0,0 +1,12 @@ +POST /v1/sites/{siteId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..7d5fd3e92e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md @@ -0,0 +1,12 @@ +POST /v1/sites/{siteId}/deployments/vcs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create.md b/docs/examples/1.8.x/server-rest/examples/sites/create.md new file mode 100644 index 0000000000..5493e9d2b6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create.md @@ -0,0 +1,27 @@ +POST /v1/sites HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "siteId": "<SITE_ID>", + "name": "<NAME>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "installationId": "<INSTALLATION_ID>", + "fallbackFile": "<FALLBACK_FILE>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..35bac59efc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md new file mode 100644 index 0000000000..0bd2f661cf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/logs/{logId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md new file mode 100644 index 0000000000..c3f1d2d293 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete.md b/docs/examples/1.8.x/server-rest/examples/sites/delete.md new file mode 100644 index 0000000000..cdb4ced577 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..d81a7dfc56 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md @@ -0,0 +1,6 @@ +GET /v1/sites/{siteId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md new file mode 100644 index 0000000000..381c20db77 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md new file mode 100644 index 0000000000..6b8366461e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/logs/{logId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md new file mode 100644 index 0000000000..7c9703ef88 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get.md b/docs/examples/1.8.x/server-rest/examples/sites/get.md new file mode 100644 index 0000000000..f13b46ecab --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md new file mode 100644 index 0000000000..22512f809d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..0007a7cd78 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md @@ -0,0 +1,5 @@ +GET /v1/sites/frameworks HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md new file mode 100644 index 0000000000..7e77b7e755 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md new file mode 100644 index 0000000000..17e8d281c6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md @@ -0,0 +1,5 @@ +GET /v1/sites/specifications HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md new file mode 100644 index 0000000000..4f99a74984 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/variables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list.md b/docs/examples/1.8.x/server-rest/examples/sites/list.md new file mode 100644 index 0000000000..d1800f05e5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list.md @@ -0,0 +1,5 @@ +GET /v1/sites HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..697d9ac371 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md @@ -0,0 +1,7 @@ +PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..51d8736df5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md @@ -0,0 +1,10 @@ +PATCH /v1/sites/{siteId}/deployment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md new file mode 100644 index 0000000000..61902ee02f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md @@ -0,0 +1,12 @@ +PUT /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update.md b/docs/examples/1.8.x/server-rest/examples/sites/update.md new file mode 100644 index 0000000000..ab3c4dddd1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update.md @@ -0,0 +1,26 @@ +PUT /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "fallbackFile": "<FALLBACK_FILE>", + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md new file mode 100644 index 0000000000..8ca9c5701b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md @@ -0,0 +1,19 @@ +POST /v1/storage/buckets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "bucketId": "<BUCKET_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..e8a54e723b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md @@ -0,0 +1,27 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"<FILE_ID>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..3db8bfbb72 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +DELETE /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..cc8a2481f7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md @@ -0,0 +1,9 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md new file mode 100644 index 0000000000..b7def1d44b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md @@ -0,0 +1,5 @@ +GET /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..4d9c691ba9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..e8a1bdeedf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..d41b8a3512 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..e11aaa9f05 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md new file mode 100644 index 0000000000..3061208d75 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md @@ -0,0 +1,5 @@ +GET /v1/storage/buckets HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..7cf8616335 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md new file mode 100644 index 0000000000..adf12647e2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md @@ -0,0 +1,18 @@ +PUT /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..d91ab4c2d6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md @@ -0,0 +1,13 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..4152d8538f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..d5318d96db --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md new file mode 100644 index 0000000000..b213fa6ceb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..125f617f1f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md new file mode 100644 index 0000000000..2e010318ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-index.md b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md new file mode 100644 index 0000000000..eaddec973a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "columns": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..f284dc03ef --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..8def17fc27 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..d8feb21916 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedTableId": "<RELATED_TABLE_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-row.md b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md new file mode 100644 index 0000000000..075be16fa4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md new file mode 100644 index 0000000000..ad3d6983cc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e654a05e3a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d98d77c68d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create.md b/docs/examples/1.8.x/server-rest/examples/tables/create.md new file mode 100644 index 0000000000..14e1f6ec05 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "tableId": "<TABLE_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..a76efb3a69 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md new file mode 100644 index 0000000000..2bda57366c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md new file mode 100644 index 0000000000..ffffc38c64 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md new file mode 100644 index 0000000000..f10adef821 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md new file mode 100644 index 0000000000..fcaf8fb472 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md @@ -0,0 +1,10 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete.md b/docs/examples/1.8.x/server-rest/examples/tables/delete.md new file mode 100644 index 0000000000..379bead1ad --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-column.md b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md new file mode 100644 index 0000000000..31d1856539 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-index.md b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md new file mode 100644 index 0000000000..076058d7f3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-row.md b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md new file mode 100644 index 0000000000..0b827f18a8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get.md b/docs/examples/1.8.x/server-rest/examples/tables/get.md new file mode 100644 index 0000000000..74877ec0c0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..480645c39c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md new file mode 100644 index 0000000000..152b36ca26 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/columns HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md new file mode 100644 index 0000000000..ee10a85d5e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md new file mode 100644 index 0000000000..46e69ab609 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list.md b/docs/examples/1.8.x/server-rest/examples/tables/list.md new file mode 100644 index 0000000000..e856ef7241 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e4a1c4602a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..6b531dc604 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md new file mode 100644 index 0000000000..531aa7a31a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..b02936fc5a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md new file mode 100644 index 0000000000..313acb6c20 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..a2552e93ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..b3cef978e2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..19fed27fdf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-row.md b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md new file mode 100644 index 0000000000..20c92d746b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md new file mode 100644 index 0000000000..249653070c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md new file mode 100644 index 0000000000..7a25ee52e8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2097e91d85 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update.md b/docs/examples/1.8.x/server-rest/examples/tables/update.md new file mode 100644 index 0000000000..786a36cf3c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md new file mode 100644 index 0000000000..7edca8018c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md @@ -0,0 +1,9 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..cfcb914866 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md @@ -0,0 +1,7 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..f52f796d90 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "userId": "<USER_ID>", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create.md b/docs/examples/1.8.x/server-rest/examples/teams/create.md new file mode 100644 index 0000000000..27e7429464 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/create.md @@ -0,0 +1,14 @@ +POST /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "teamId": "<TEAM_ID>", + "name": "<NAME>", + "roles": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e897d84a12 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md @@ -0,0 +1,9 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete.md b/docs/examples/1.8.x/server-rest/examples/teams/delete.md new file mode 100644 index 0000000000..213489c7fb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete.md @@ -0,0 +1,9 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..1d10cfe437 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ddb863181d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get.md b/docs/examples/1.8.x/server-rest/examples/teams/get.md new file mode 100644 index 0000000000..4ecf74596b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/get.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..38cc17b71a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list.md b/docs/examples/1.8.x/server-rest/examples/teams/list.md new file mode 100644 index 0000000000..c67b429008 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/list.md @@ -0,0 +1,7 @@ +GET /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9d828118f0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..6730d5c27c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "roles": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..fa811a2438 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md @@ -0,0 +1,12 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..1db6300350 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..c1fbb63d2d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md @@ -0,0 +1,10 @@ +POST /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "expire": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md new file mode 100644 index 0000000000..ee564b01c4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/get.md b/docs/examples/1.8.x/server-rest/examples/tokens/get.md new file mode 100644 index 0000000000..b39c8390e3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/get.md @@ -0,0 +1,5 @@ +GET /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/list.md b/docs/examples/1.8.x/server-rest/examples/tokens/list.md new file mode 100644 index 0000000000..8909d05572 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/list.md @@ -0,0 +1,5 @@ +GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/update.md b/docs/examples/1.8.x/server-rest/examples/tokens/update.md new file mode 100644 index 0000000000..8ab9d60555 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/update.md @@ -0,0 +1,10 @@ +PATCH /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "expire": +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md new file mode 100644 index 0000000000..d557cf6d5f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md @@ -0,0 +1,13 @@ +POST /v1/users/argon2 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..cda7491160 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md @@ -0,0 +1,13 @@ +POST /v1/users/bcrypt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..83208adadb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md @@ -0,0 +1,11 @@ +POST /v1/users/{userId}/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "sessionId": "<SESSION_ID>", + "duration": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..d4896133a1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md @@ -0,0 +1,13 @@ +POST /v1/users/md5 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2f6524646d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +PATCH /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..4c10b1a82d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md @@ -0,0 +1,13 @@ +POST /v1/users/phpass HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..5c6467a2fe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md @@ -0,0 +1,14 @@ +POST /v1/users/sha HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordVersion": "sha1", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..19d0650840 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,16 @@ +POST /v1/users/scrypt-modified HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordSaltSeparator": "<PASSWORD_SALT_SEPARATOR>", + "passwordSignerKey": "<PASSWORD_SIGNER_KEY>", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..008eab6848 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md @@ -0,0 +1,18 @@ +POST /v1/users/scrypt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordCpu": 0, + "passwordMemory": 0, + "passwordParallel": 0, + "passwordLength": 0, + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-session.md b/docs/examples/1.8.x/server-rest/examples/users/create-session.md new file mode 100644 index 0000000000..ec71d421e0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-session.md @@ -0,0 +1,7 @@ +POST /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-target.md b/docs/examples/1.8.x/server-rest/examples/users/create-target.md new file mode 100644 index 0000000000..fced935c1b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-target.md @@ -0,0 +1,14 @@ +POST /v1/users/{userId}/targets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "targetId": "<TARGET_ID>", + "providerType": "email", + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-token.md b/docs/examples/1.8.x/server-rest/examples/users/create-token.md new file mode 100644 index 0000000000..4339252660 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-token.md @@ -0,0 +1,11 @@ +POST /v1/users/{userId}/tokens HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "length": 4, + "expire": 60 +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create.md b/docs/examples/1.8.x/server-rest/examples/users/create.md new file mode 100644 index 0000000000..67d377255b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create.md @@ -0,0 +1,14 @@ +POST /v1/users HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phone": "+12065550100", + "password": , + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md new file mode 100644 index 0000000000..c2aa5eed16 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +DELETE /v1/users/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..9d9e2e950f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md new file mode 100644 index 0000000000..be204911a2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md new file mode 100644 index 0000000000..54f3a8d4f1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md new file mode 100644 index 0000000000..77e2c23dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete.md b/docs/examples/1.8.x/server-rest/examples/users/delete.md new file mode 100644 index 0000000000..c31212aa71 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..58dd32d2a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md new file mode 100644 index 0000000000..ac04cc5c44 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-target.md b/docs/examples/1.8.x/server-rest/examples/users/get-target.md new file mode 100644 index 0000000000..2f19db7c7a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get-target.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get.md b/docs/examples/1.8.x/server-rest/examples/users/get.md new file mode 100644 index 0000000000..f654676d9b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md new file mode 100644 index 0000000000..180a2127a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md @@ -0,0 +1,5 @@ +GET /v1/users/identities HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md new file mode 100644 index 0000000000..7149f50abe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md new file mode 100644 index 0000000000..7d32f2f726 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..a75b26e1c5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md new file mode 100644 index 0000000000..1ef39b835b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md new file mode 100644 index 0000000000..e9542c0da0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/targets HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list.md b/docs/examples/1.8.x/server-rest/examples/users/list.md new file mode 100644 index 0000000000..a92f71439b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list.md @@ -0,0 +1,5 @@ +GET /v1/users HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md new file mode 100644 index 0000000000..cf65c72b0c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "emailVerification": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email.md b/docs/examples/1.8.x/server-rest/examples/users/update-email.md new file mode 100644 index 0000000000..10ccafb079 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "email": "email@example.com" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md new file mode 100644 index 0000000000..f01603f1f4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md @@ -0,0 +1,10 @@ +PUT /v1/users/{userId}/labels HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "labels": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..aa3bb3f6e6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +PUT /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md new file mode 100644 index 0000000000..fce9198887 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "mfa": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-name.md b/docs/examples/1.8.x/server-rest/examples/users/update-name.md new file mode 100644 index 0000000000..c8988dfb1d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-name.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-password.md b/docs/examples/1.8.x/server-rest/examples/users/update-password.md new file mode 100644 index 0000000000..fb796d5619 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-password.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "password": +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..ca3958605b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "phoneVerification": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md new file mode 100644 index 0000000000..5bc196d668 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "number": "+12065550100" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md new file mode 100644 index 0000000000..1db82743e8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-status.md b/docs/examples/1.8.x/server-rest/examples/users/update-status.md new file mode 100644 index 0000000000..6d07f2e15f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-status.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "status": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-target.md b/docs/examples/1.8.x/server-rest/examples/users/update-target.md new file mode 100644 index 0000000000..926fb166a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-target.md @@ -0,0 +1,12 @@ +PATCH /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-ruby/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..bcb25d66f5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_anonymous_session() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-ruby/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..be5fc1c07a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_email_password_session( + email: 'email@example.com', + password: 'password' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-email-token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-email-token.md new file mode 100644 index 0000000000..d75e310a36 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_email_token( + user_id: '<USER_ID>', + email: 'email@example.com', + phrase: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..8e5b6b78c8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_jwt() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..9537d1fb3d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_magic_url_token( + user_id: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', # optional + phrase: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..a3cc71cd8a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_authenticator( + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..ba34779ad2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_mfa_challenge( + factor: AuthenticationFactor::EMAIL +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..db91cf533d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..52bc5d6194 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_o_auth2_token( + provider: OAuthProvider::AMAZON, + success: 'https://example.com', # optional + failure: 'https://example.com', # optional + scopes: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-token.md new file mode 100644 index 0000000000..81bedd0ce9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_phone_token( + user_id: '<USER_ID>', + phone: '+12065550100' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a7dec8f34e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_phone_verification() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-recovery.md b/docs/examples/1.8.x/server-ruby/examples/account/create-recovery.md new file mode 100644 index 0000000000..e344bafc75 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_recovery( + email: 'email@example.com', + url: 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-session.md b/docs/examples/1.8.x/server-ruby/examples/account/create-session.md new file mode 100644 index 0000000000..4b8ce216bc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/create-verification.md new file mode 100644 index 0000000000..2eba7c776d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-verification.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_verification( + url: 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create.md b/docs/examples/1.8.x/server-ruby/examples/account/create.md new file mode 100644 index 0000000000..84228b8351 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create( + user_id: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-identity.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-identity.md new file mode 100644 index 0000000000..e8f8e83814 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_identity( + identity_id: '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..832ff6ae13 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_mfa_authenticator( + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-session.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-session.md new file mode 100644 index 0000000000..7496cafe3a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-sessions.md new file mode 100644 index 0000000000..ca5d922483 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_sessions() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..26ffa9d61d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get-prefs.md b/docs/examples/1.8.x/server-ruby/examples/account/get-prefs.md new file mode 100644 index 0000000000..664454cf2f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_prefs() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get-session.md b/docs/examples/1.8.x/server-ruby/examples/account/get-session.md new file mode 100644 index 0000000000..c433b22e46 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get.md b/docs/examples/1.8.x/server-ruby/examples/account/get.md new file mode 100644 index 0000000000..f33050345d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-identities.md b/docs/examples/1.8.x/server-ruby/examples/account/list-identities.md new file mode 100644 index 0000000000..696e02dd5a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-identities.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_identities( + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-logs.md b/docs/examples/1.8.x/server-ruby/examples/account/list-logs.md new file mode 100644 index 0000000000..1f3366a2ed --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_logs( + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-ruby/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..460ac87ac1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_mfa_factors() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-sessions.md b/docs/examples/1.8.x/server-ruby/examples/account/list-sessions.md new file mode 100644 index 0000000000..b5968c498f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_sessions() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-email.md b/docs/examples/1.8.x/server-ruby/examples/account/update-email.md new file mode 100644 index 0000000000..24b43edebd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-email.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_email( + email: 'email@example.com', + password: 'password' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..b1b50f32fd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa( + mfa: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c96820f183 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.update_magic_url_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..5ff2adcbdc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_authenticator( + type: AuthenticatorType::TOTP, + otp: '<OTP>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..2f4b61d581 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_challenge( + challenge_id: '<CHALLENGE_ID>', + otp: '<OTP>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..ad1f2e5f0e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-name.md b/docs/examples/1.8.x/server-ruby/examples/account/update-name.md new file mode 100644 index 0000000000..ef8a5cbb4f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-name.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_name( + name: '<NAME>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-password.md b/docs/examples/1.8.x/server-ruby/examples/account/update-password.md new file mode 100644 index 0000000000..4b8705359b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-password.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_password( + password: '', + old_password: 'password' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-session.md new file mode 100644 index 0000000000..b81c485c8c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.update_phone_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..8dcf316e49 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_phone_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-phone.md b/docs/examples/1.8.x/server-ruby/examples/account/update-phone.md new file mode 100644 index 0000000000..ea758a8d8d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-phone.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_phone( + phone: '+12065550100', + password: 'password' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-prefs.md b/docs/examples/1.8.x/server-ruby/examples/account/update-prefs.md new file mode 100644 index 0000000000..ecfe4f4988 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_prefs( + prefs: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-recovery.md b/docs/examples/1.8.x/server-ruby/examples/account/update-recovery.md new file mode 100644 index 0000000000..42c483771c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_recovery( + user_id: '<USER_ID>', + secret: '<SECRET>', + password: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-session.md b/docs/examples/1.8.x/server-ruby/examples/account/update-session.md new file mode 100644 index 0000000000..34e00eec25 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-status.md b/docs/examples/1.8.x/server-ruby/examples/account/update-status.md new file mode 100644 index 0000000000..5c543b790c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-status.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_status() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/update-verification.md new file mode 100644 index 0000000000..9866ade95c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-browser.md new file mode 100644 index 0000000000..36354d1dce --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_browser( + code: Browser::AVANT_BROWSER, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..09a0245034 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_credit_card( + code: CreditCard::AMERICAN_EXPRESS, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..7c8bd4347f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_favicon( + url: 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-flag.md new file mode 100644 index 0000000000..61b7793048 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_flag( + code: Flag::AFGHANISTAN, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-image.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-image.md new file mode 100644 index 0000000000..f46fad0c44 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_image( + url: 'https://example.com', + width: 0, # optional + height: 0 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-initials.md new file mode 100644 index 0000000000..85e5a6a422 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_initials( + name: '<NAME>', # optional + width: 0, # optional + height: 0, # optional + background: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..9c6e34686c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_qr( + text: '<TEXT>', + size: 1, # optional + margin: 0, # optional + download: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..158ea05623 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md new file mode 100644 index 0000000000..c22b34813e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + document_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..af12b7965b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md new file mode 100644 index 0000000000..ce8dea79ef --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases.new(client) + +result = databases.create_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md new file mode 100644 index 0000000000..ecccdf5b21 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..7f36f6b076 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..c8e390a1a9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..fa77f89902 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-index.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-index.md new file mode 100644 index 0000000000..18c2f0ee6a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + type: IndexType::KEY, + attributes: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..a689502136 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..7abeee9403 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..b056f3bbb2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + related_collection_id: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..d94af0f22f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..3ffd7321a1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create.md b/docs/examples/1.8.x/server-ruby/examples/databases/create.md new file mode 100644 index 0000000000..62675e6ba7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..9b5a5f4006 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.decrement_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..816b31e43f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-collection.md new file mode 100644 index 0000000000..28dd8d773c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-document.md new file mode 100644 index 0000000000..2102d2695b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-document.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.delete_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-documents.md new file mode 100644 index 0000000000..d0f10d0b41 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-documents.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-index.md new file mode 100644 index 0000000000..b5d9231508 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete.md new file mode 100644 index 0000000000..802f5d6bd4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-attribute.md new file mode 100644 index 0000000000..1558de656a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-attribute.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-collection.md new file mode 100644 index 0000000000..89ae0e32ac --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-document.md new file mode 100644 index 0000000000..f43a1a2924 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-document.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.get_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-index.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-index.md new file mode 100644 index 0000000000..cd5fca3d60 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get.md b/docs/examples/1.8.x/server-ruby/examples/databases/get.md new file mode 100644 index 0000000000..c042cd7c4e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..40d8ba2ab7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.increment_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-attributes.md new file mode 100644 index 0000000000..f1ec0dedcd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-attributes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_attributes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-collections.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-collections.md new file mode 100644 index 0000000000..26f3d35552 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-collections.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_collections( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-documents.md new file mode 100644 index 0000000000..6617198d3f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-documents.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.list_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-indexes.md new file mode 100644 index 0000000000..f98c62a444 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_indexes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list.md b/docs/examples/1.8.x/server-ruby/examples/databases/list.md new file mode 100644 index 0000000000..2e093f73b1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..72f0eac088 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md new file mode 100644 index 0000000000..d42a651cbb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + document_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..b726283323 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md new file mode 100644 index 0000000000..485eb0485a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.update_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-documents.md new file mode 100644 index 0000000000..2f6907294f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-documents.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..3324e39860 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..72a0515467 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..738e6de36a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..dece44544f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..deceb732e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..679edb823e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..66f458e800 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..cbf417b6bf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update.md b/docs/examples/1.8.x/server-ruby/examples/databases/update.md new file mode 100644 index 0000000000..e5c02a11f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md new file mode 100644 index 0000000000..d165e1e6cd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases.new(client) + +result = databases.upsert_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..8e404e684e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.upsert_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-deployment.md new file mode 100644 index 0000000000..0ff3db31e9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_deployment( + function_id: '<FUNCTION_ID>', + code: InputFile.from_path('dir/file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..cd432afc95 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_duplicate_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + build_id: '<BUILD_ID>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md new file mode 100644 index 0000000000..b64b1d5c57 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.create_execution( + function_id: '<FUNCTION_ID>', + body: '<BODY>', # optional + async: false, # optional + path: '<PATH>', # optional + method: ExecutionMethod::GET, # optional + headers: {}, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..a447b6e9aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_template_deployment( + function_id: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-variable.md new file mode 100644 index 0000000000..3c957d45f8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_variable( + function_id: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..75bd3c49f5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_vcs_deployment( + function_id: '<FUNCTION_ID>', + type: VCSDeploymentType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create.md b/docs/examples/1.8.x/server-ruby/examples/functions/create.md new file mode 100644 index 0000000000..cad021b5f8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE_14_5, + execute: ["any"], # optional + events: [], # optional + schedule: '', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..192172cf9c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete-execution.md new file mode 100644 index 0000000000..4172aade32 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete-variable.md new file mode 100644 index 0000000000..ffbe69f106 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete.md new file mode 100644 index 0000000000..e5c59e39c0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..a1a50a5f94 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_deployment_download( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment.md new file mode 100644 index 0000000000..1651ae1285 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-execution.md new file mode 100644 index 0000000000..7ab910e785 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.get_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-variable.md new file mode 100644 index 0000000000..5022cf84d6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get.md b/docs/examples/1.8.x/server-ruby/examples/functions/get.md new file mode 100644 index 0000000000..5cfd135028 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-deployments.md new file mode 100644 index 0000000000..3df3dd3ee8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_deployments( + function_id: '<FUNCTION_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-executions.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-executions.md new file mode 100644 index 0000000000..57b4ba26bc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.list_executions( + function_id: '<FUNCTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..1b6d25ee6d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_runtimes() diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-specifications.md new file mode 100644 index 0000000000..2c9cf7c470 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-specifications.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_specifications() diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-variables.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-variables.md new file mode 100644 index 0000000000..dd3fc4f2ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_variables( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list.md b/docs/examples/1.8.x/server-ruby/examples/functions/list.md new file mode 100644 index 0000000000..0cab1c34d7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-ruby/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..6664e05079 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_deployment_status( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..68c5d7fdfd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_function_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/update-variable.md new file mode 100644 index 0000000000..7c4e402820 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', # optional + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update.md b/docs/examples/1.8.x/server-ruby/examples/functions/update.md new file mode 100644 index 0000000000..45b6e32ab3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update.md @@ -0,0 +1,31 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE_14_5, # optional + execute: ["any"], # optional + events: [], # optional + schedule: '', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/graphql/mutation.md b/docs/examples/1.8.x/server-ruby/examples/graphql/mutation.md new file mode 100644 index 0000000000..08ca6f30d2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql.new(client) + +result = graphql.mutation( + query: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/graphql/query.md b/docs/examples/1.8.x/server-ruby/examples/graphql/query.md new file mode 100644 index 0000000000..05e69506a1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/graphql/query.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql.new(client) + +result = graphql.query( + query: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-ruby/examples/health/get-antivirus.md new file mode 100644 index 0000000000..5f8d06056d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_antivirus() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-cache.md b/docs/examples/1.8.x/server-ruby/examples/health/get-cache.md new file mode 100644 index 0000000000..01bd46cd0b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-cache.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_cache() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-certificate.md b/docs/examples/1.8.x/server-ruby/examples/health/get-certificate.md new file mode 100644 index 0000000000..64699d42d0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-certificate.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_certificate( + domain: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md b/docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md new file mode 100644 index 0000000000..d9668339c5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_db() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-ruby/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..73e1983e3a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_failed_jobs( + name: ::V1_DATABASE, + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-ruby/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..86e9c409ed --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-pub-sub.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_pub_sub() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..9f876982ef --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-builds.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_builds( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..d10c2feb39 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_certificates( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..37024d8144 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-databases.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_databases( + name: '<NAME>', # optional + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..2508be22ba --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_deletes( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..e5b56474bc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_functions( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..cb35ac333b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_logs( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..36cfec3d87 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-mails.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_mails( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..d317f2a74c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_messaging( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..3c68c865dc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_migrations( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..7024bac307 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_stats_resources( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..b687bd8789 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-usage.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_usage( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..28f28ea78a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_webhooks( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-ruby/examples/health/get-storage-local.md new file mode 100644 index 0000000000..a122de50ee --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_storage_local() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-storage.md b/docs/examples/1.8.x/server-ruby/examples/health/get-storage.md new file mode 100644 index 0000000000..ee778643ec --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-storage.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_storage() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-time.md b/docs/examples/1.8.x/server-ruby/examples/health/get-time.md new file mode 100644 index 0000000000..9d345557a3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-time.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_time() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get.md b/docs/examples/1.8.x/server-ruby/examples/health/get.md new file mode 100644 index 0000000000..4bbf0c0eb0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/get.md b/docs/examples/1.8.x/server-ruby/examples/locale/get.md new file mode 100644 index 0000000000..264da0e187 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.get() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-codes.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-codes.md new file mode 100644 index 0000000000..27632669f0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-continents.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-continents.md new file mode 100644 index 0000000000..b78f130201 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_continents() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..8498f2bdda --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries_eu() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..8fa087e920 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries_phones() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-countries.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries.md new file mode 100644 index 0000000000..a635a4e0b3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-currencies.md new file mode 100644 index 0000000000..60e9d94df9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_currencies() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-languages.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-languages.md new file mode 100644 index 0000000000..e5b9df1945 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_languages() diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..a280340847 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-email.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-email.md new file mode 100644 index 0000000000..573a5b83d4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-email.md @@ -0,0 +1,25 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_email( + message_id: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # optional + cc: [], # optional + bcc: [], # optional + attachments: [], # optional + draft: false, # optional + html: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..a1e8b67b51 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + service_account_json: {}, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..aa5b7f1899 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + domain: '<DOMAIN>', # optional + is_eu_region: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..35a192f148 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-push.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-push.md new file mode 100644 index 0000000000..5c58fa542b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-push.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_push( + message_id: '<MESSAGE_ID>', + title: '<TITLE>', # optional + body: '<BODY>', # optional + topics: [], # optional + users: [], # optional + targets: [], # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '[ID1:ID2]', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: null, # optional + draft: false, # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..eae3ad3ece --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sms.md new file mode 100644 index 0000000000..901ec40c05 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sms.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_sms( + message_id: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # optional + draft: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..b062e574b4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, # optional + username: '<USERNAME>', # optional + password: '<PASSWORD>', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..1f6fa43736 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.create_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..b26d9d2784 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..4fd1a3683e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-topic.md new file mode 100644 index 0000000000..da2cf5e57b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..a945602646 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..5a5f6eb72b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..3c19e1ba0f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-provider.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete_provider( + provider_id: '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..a82e5e94c2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.delete_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..cb58ee5c6c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-topic.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete_topic( + topic_id: '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete.md new file mode 100644 index 0000000000..e3db26127d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete( + message_id: '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-message.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-message.md new file mode 100644 index 0000000000..f5449a0be4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-message.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_message( + message_id: '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-provider.md new file mode 100644 index 0000000000..ddb28da4de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-provider.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_provider( + provider_id: '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..3c7d05334e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-topic.md new file mode 100644 index 0000000000..9ff732fc26 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-topic.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_topic( + topic_id: '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..f20d6fb491 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_message_logs( + message_id: '<MESSAGE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-messages.md new file mode 100644 index 0000000000..ffc5dcdbc6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-messages.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_messages( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..af3751a18f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_provider_logs( + provider_id: '<PROVIDER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-providers.md new file mode 100644 index 0000000000..a857f0562f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-providers.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_providers( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..06550e7067 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_subscriber_logs( + subscriber_id: '<SUBSCRIBER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..07ebc99bab --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_subscribers( + topic_id: '<TOPIC_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-targets.md new file mode 100644 index 0000000000..0407255d86 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-targets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_targets( + message_id: '<MESSAGE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..9b53c47f82 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_topic_logs( + topic_id: '<TOPIC_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topics.md new file mode 100644 index 0000000000..5e7b6740cc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topics.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_topics( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..b19704aaed --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-email.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-email.md new file mode 100644 index 0000000000..aa3593292f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-email.md @@ -0,0 +1,25 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_email( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + subject: '<SUBJECT>', # optional + content: '<CONTENT>', # optional + draft: false, # optional + html: false, # optional + cc: [], # optional + bcc: [], # optional + scheduled_at: '', # optional + attachments: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..44ea0d28de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + service_account_json: {} # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..a2e53190d7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + api_key: '<API_KEY>', # optional + domain: '<DOMAIN>', # optional + is_eu_region: false, # optional + enabled: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..0e88382850 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-push.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-push.md new file mode 100644 index 0000000000..42a5104ccb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-push.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_push( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + title: '<TITLE>', # optional + body: '<BODY>', # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '[ID1:ID2]', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: null, # optional + draft: false, # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..99f1a9c7f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sms.md new file mode 100644 index 0000000000..b31480c1a0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sms.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_sms( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + content: '<CONTENT>', # optional + draft: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..bbaebf3c32 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + host: '<HOST>', # optional + port: 1, # optional + username: '<USERNAME>', # optional + password: '<PASSWORD>', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..4f1bf6ff5b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..c8cd2f0daf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-topic.md new file mode 100644 index 0000000000..d20d945385 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', # optional + subscribe: ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..0f6a6761e1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..e75bfbd98e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-deployment.md new file mode 100644 index 0000000000..b392b8679a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_deployment( + site_id: '<SITE_ID>', + code: InputFile.from_path('dir/file.png'), + activate: false, + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..f72b7a641b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_duplicate_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..7df9665590 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_template_deployment( + site_id: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-variable.md new file mode 100644 index 0000000000..4d2031f8ea --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_variable( + site_id: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..2e72b6e3f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_vcs_deployment( + site_id: '<SITE_ID>', + type: VCSDeploymentType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create.md b/docs/examples/1.8.x/server-ruby/examples/sites/create.md new file mode 100644 index 0000000000..2243185485 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG, + build_runtime: ::NODE_14_5, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + adapter: ::STATIC, # optional + installation_id: '<INSTALLATION_ID>', # optional + fallback_file: '<FALLBACK_FILE>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..6f96e05023 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete-log.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete-log.md new file mode 100644 index 0000000000..556f3e2855 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete-variable.md new file mode 100644 index 0000000000..ca5e51b2b9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete.md new file mode 100644 index 0000000000..e92d6428e1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..85162626ba --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_deployment_download( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment.md new file mode 100644 index 0000000000..79f47e4aad --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-log.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-log.md new file mode 100644 index 0000000000..2e5e8c2d4c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-log.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-variable.md new file mode 100644 index 0000000000..ac27efcd50 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get.md b/docs/examples/1.8.x/server-ruby/examples/sites/get.md new file mode 100644 index 0000000000..a8d3aac1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-deployments.md new file mode 100644 index 0000000000..8571f8561a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-deployments.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_deployments( + site_id: '<SITE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..61f18fbf6f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-frameworks.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_frameworks() diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-logs.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-logs.md new file mode 100644 index 0000000000..919be968c9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_logs( + site_id: '<SITE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-specifications.md new file mode 100644 index 0000000000..42f41157fb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-specifications.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_specifications() diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-variables.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-variables.md new file mode 100644 index 0000000000..cf10fa4628 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-variables.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_variables( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list.md b/docs/examples/1.8.x/server-ruby/examples/sites/list.md new file mode 100644 index 0000000000..ba70205236 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-ruby/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..859ad22b61 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_deployment_status( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..bc033e931e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_site_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/update-variable.md new file mode 100644 index 0000000000..e61f129573 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', # optional + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update.md b/docs/examples/1.8.x/server-ruby/examples/sites/update.md new file mode 100644 index 0000000000..922255ab65 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + build_runtime: ::NODE_14_5, # optional + adapter: ::STATIC, # optional + fallback_file: '<FALLBACK_FILE>', # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md new file mode 100644 index 0000000000..643431ed2c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.create_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: ::NONE, # optional + encryption: false, # optional + antivirus: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md new file mode 100644 index 0000000000..99e07c33f4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.create_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + file: InputFile.from_path('dir/file.png'), + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..dda3264e66 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.delete_bucket( + bucket_id: '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/delete-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/delete-file.md new file mode 100644 index 0000000000..eef058857c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.delete_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-bucket.md new file mode 100644 index 0000000000..7c8580dcaf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.get_bucket( + bucket_id: '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-download.md new file mode 100644 index 0000000000..7b7075184a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_download( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + token: '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..23254615d3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-preview.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_preview( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + width: 0, # optional + height: 0, # optional + gravity: ImageGravity::CENTER, # optional + quality: -1, # optional + border_width: 0, # optional + border_color: '', # optional + border_radius: 0, # optional + opacity: 0, # optional + rotation: -360, # optional + background: '', # optional + output: ImageFormat::JPG, # optional + token: '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-view.md new file mode 100644 index 0000000000..c9e9952f05 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_view( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + token: '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file.md new file mode 100644 index 0000000000..b816bdba02 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-ruby/examples/storage/list-buckets.md new file mode 100644 index 0000000000..dfee831b69 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/list-buckets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.list_buckets( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/list-files.md b/docs/examples/1.8.x/server-ruby/examples/storage/list-files.md new file mode 100644 index 0000000000..078ff55e41 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/list-files.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.list_files( + bucket_id: '<BUCKET_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md new file mode 100644 index 0000000000..09b915eb5f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.update_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: ::NONE, # optional + encryption: false, # optional + antivirus: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md new file mode 100644 index 0000000000..a454499d9d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.update_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + name: '<NAME>', # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..7df3908513 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..2d65509184 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md new file mode 100644 index 0000000000..01f7ad43b5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..97fcb589e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md new file mode 100644 index 0000000000..9df32a3f5b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md new file mode 100644 index 0000000000..3c8dfdfb6b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + type: IndexType::KEY, + columns: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..d0c5c78108 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..0c97840a27 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8f7fb841aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + related_table_id: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md new file mode 100644 index 0000000000..a625249700 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables.new(client) + +result = tables.create_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md new file mode 100644 index 0000000000..2e78b96cbc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md new file mode 100644 index 0000000000..d47cf49e0c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md new file mode 100644 index 0000000000..fcfebac7a8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create.md b/docs/examples/1.8.x/server-ruby/examples/tables/create.md new file mode 100644 index 0000000000..5a255fafac --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..e22afcb0ad --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.decrement_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md new file mode 100644 index 0000000000..245864053f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md new file mode 100644 index 0000000000..54bd5455aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md new file mode 100644 index 0000000000..9841fc2d2f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.delete_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md new file mode 100644 index 0000000000..7be1e4bc70 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md new file mode 100644 index 0000000000..ca607f2b6b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md new file mode 100644 index 0000000000..1a1469d005 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md new file mode 100644 index 0000000000..7d762ce8ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md new file mode 100644 index 0000000000..4526bb7316 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.get_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get.md b/docs/examples/1.8.x/server-ruby/examples/tables/get.md new file mode 100644 index 0000000000..22ba02aebc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..c0a91d4b62 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.increment_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md new file mode 100644 index 0000000000..7e851564c2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list_columns( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0789291071 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list_indexes( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md new file mode 100644 index 0000000000..bc9a0a49f6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.list_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list.md b/docs/examples/1.8.x/server-ruby/examples/tables/list.md new file mode 100644 index 0000000000..7cf987ebb9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..a09b365cd1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..55e0484b4c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md new file mode 100644 index 0000000000..285cd6655a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..90773ed9e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md new file mode 100644 index 0000000000..0bb992bd3c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..35f8c471a8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..2ad1840a9d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..de86fd53d7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md new file mode 100644 index 0000000000..500927dcf0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.update_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md new file mode 100644 index 0000000000..8cee1810be --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md new file mode 100644 index 0000000000..2240f49555 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md new file mode 100644 index 0000000000..0947a78a9e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update.md b/docs/examples/1.8.x/server-ruby/examples/tables/update.md new file mode 100644 index 0000000000..003d3d041c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md new file mode 100644 index 0000000000..d96172e1ec --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables.new(client) + +result = tables.upsert_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..8987b1ee0e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.upsert_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/create-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/create-membership.md new file mode 100644 index 0000000000..6c0faba77d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create_membership( + team_id: '<TEAM_ID>', + roles: [], + email: 'email@example.com', # optional + user_id: '<USER_ID>', # optional + phone: '+12065550100', # optional + url: 'https://example.com', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/create.md b/docs/examples/1.8.x/server-ruby/examples/teams/create.md new file mode 100644 index 0000000000..ba71a1dfc4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create( + team_id: '<TEAM_ID>', + name: '<NAME>', + roles: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5d815a8ca3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.delete_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/delete.md b/docs/examples/1.8.x/server-ruby/examples/teams/delete.md new file mode 100644 index 0000000000..c9f7c400e9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.delete( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/get-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/get-membership.md new file mode 100644 index 0000000000..41a2c7bfb4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-ruby/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e6b2cfadce --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get_prefs( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/get.md b/docs/examples/1.8.x/server-ruby/examples/teams/get.md new file mode 100644 index 0000000000..af51193cd3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-ruby/examples/teams/list-memberships.md new file mode 100644 index 0000000000..db48f0cfc6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/list-memberships.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list_memberships( + team_id: '<TEAM_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/list.md b/docs/examples/1.8.x/server-ruby/examples/teams/list.md new file mode 100644 index 0000000000..9e96391975 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..40d82b86f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership-status.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership_status( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership.md new file mode 100644 index 0000000000..92b69b1773 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + roles: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-name.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-name.md new file mode 100644 index 0000000000..74f785c4ca --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-name.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_name( + team_id: '<TEAM_ID>', + name: '<NAME>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-prefs.md new file mode 100644 index 0000000000..03426aa3b9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_prefs( + team_id: '<TEAM_ID>', + prefs: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-ruby/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..8c432c5255 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.create_file_token( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + expire: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/delete.md b/docs/examples/1.8.x/server-ruby/examples/tokens/delete.md new file mode 100644 index 0000000000..cb59147f42 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.delete( + token_id: '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/get.md b/docs/examples/1.8.x/server-ruby/examples/tokens/get.md new file mode 100644 index 0000000000..ef87c74294 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.get( + token_id: '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/list.md b/docs/examples/1.8.x/server-ruby/examples/tokens/list.md new file mode 100644 index 0000000000..4932f04151 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/list.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.list( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/update.md b/docs/examples/1.8.x/server-ruby/examples/tokens/update.md new file mode 100644 index 0000000000..91713730fb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/update.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.update( + token_id: '<TOKEN_ID>', + expire: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md new file mode 100644 index 0000000000..8da9e0b1ff --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_argon2_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..7c2b852d69 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_bcrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..57f7f1d32f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_jwt( + user_id: '<USER_ID>', + session_id: '<SESSION_ID>', # optional + duration: 0 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..63fb68742e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_md5_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..0cdea46af3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..7cd898a6fc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_ph_pass_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..f3951d9c80 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_sha_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_version: PasswordHash::SHA1, # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..d84c2eed48 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_scrypt_modified_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_salt_separator: '<PASSWORD_SALT_SEPARATOR>', + password_signer_key: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..53aa253d2a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_scrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_cpu: null, + password_memory: null, + password_parallel: null, + password_length: null, + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-session.md b/docs/examples/1.8.x/server-ruby/examples/users/create-session.md new file mode 100644 index 0000000000..32d2b5f2ad --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_session( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-target.md b/docs/examples/1.8.x/server-ruby/examples/users/create-target.md new file mode 100644 index 0000000000..3e87868df6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-target.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + provider_type: MessagingProviderType::EMAIL, + identifier: '<IDENTIFIER>', + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-token.md b/docs/examples/1.8.x/server-ruby/examples/users/create-token.md new file mode 100644 index 0000000000..85e5f448ca --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_token( + user_id: '<USER_ID>', + length: 4, # optional + expire: 60 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create.md b/docs/examples/1.8.x/server-ruby/examples/users/create.md new file mode 100644 index 0000000000..4f57adeb87 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create( + user_id: '<USER_ID>', + email: 'email@example.com', # optional + phone: '+12065550100', # optional + password: '', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-identity.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-identity.md new file mode 100644 index 0000000000..d2482dfae1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_identity( + identity_id: '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..50fcb0fa0d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_mfa_authenticator( + user_id: '<USER_ID>', + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-session.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-session.md new file mode 100644 index 0000000000..9b14cc4fa3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-session.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_session( + user_id: '<USER_ID>', + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-sessions.md new file mode 100644 index 0000000000..23fd505763 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_sessions( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-target.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-target.md new file mode 100644 index 0000000000..f1564024db --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-target.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete.md b/docs/examples/1.8.x/server-ruby/examples/users/delete.md new file mode 100644 index 0000000000..db7f2ee6f8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..f984517d26 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get-prefs.md b/docs/examples/1.8.x/server-ruby/examples/users/get-prefs.md new file mode 100644 index 0000000000..0118b39897 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_prefs( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get-target.md b/docs/examples/1.8.x/server-ruby/examples/users/get-target.md new file mode 100644 index 0000000000..10ce49b229 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get-target.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get.md b/docs/examples/1.8.x/server-ruby/examples/users/get.md new file mode 100644 index 0000000000..95865b7e6c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-identities.md b/docs/examples/1.8.x/server-ruby/examples/users/list-identities.md new file mode 100644 index 0000000000..78c8cf5098 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-identities.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_identities( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-logs.md b/docs/examples/1.8.x/server-ruby/examples/users/list-logs.md new file mode 100644 index 0000000000..686434869c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_logs( + user_id: '<USER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-memberships.md b/docs/examples/1.8.x/server-ruby/examples/users/list-memberships.md new file mode 100644 index 0000000000..a4c3aa11d2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-memberships.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_memberships( + user_id: '<USER_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-ruby/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..ca1e2b2b96 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_mfa_factors( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-sessions.md b/docs/examples/1.8.x/server-ruby/examples/users/list-sessions.md new file mode 100644 index 0000000000..311420531f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_sessions( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-targets.md b/docs/examples/1.8.x/server-ruby/examples/users/list-targets.md new file mode 100644 index 0000000000..aae9941794 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-targets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_targets( + user_id: '<USER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list.md b/docs/examples/1.8.x/server-ruby/examples/users/list.md new file mode 100644 index 0000000000..b490b65099 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-ruby/examples/users/update-email-verification.md new file mode 100644 index 0000000000..07f85f0318 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_email_verification( + user_id: '<USER_ID>', + email_verification: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-email.md b/docs/examples/1.8.x/server-ruby/examples/users/update-email.md new file mode 100644 index 0000000000..b36aac59d1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-email.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_email( + user_id: '<USER_ID>', + email: 'email@example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-labels.md b/docs/examples/1.8.x/server-ruby/examples/users/update-labels.md new file mode 100644 index 0000000000..a62d34b2e2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-labels.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_labels( + user_id: '<USER_ID>', + labels: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..aaf5ba16c0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-mfa.md b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa.md new file mode 100644 index 0000000000..3ebfb96116 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_mfa( + user_id: '<USER_ID>', + mfa: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-name.md b/docs/examples/1.8.x/server-ruby/examples/users/update-name.md new file mode 100644 index 0000000000..e7ade96e32 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-name.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_name( + user_id: '<USER_ID>', + name: '<NAME>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-password.md b/docs/examples/1.8.x/server-ruby/examples/users/update-password.md new file mode 100644 index 0000000000..47c1f1ef49 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-password.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_password( + user_id: '<USER_ID>', + password: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-ruby/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..6af7fcb638 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_phone_verification( + user_id: '<USER_ID>', + phone_verification: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-phone.md b/docs/examples/1.8.x/server-ruby/examples/users/update-phone.md new file mode 100644 index 0000000000..bd26547daa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-phone.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_phone( + user_id: '<USER_ID>', + number: '+12065550100' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-prefs.md b/docs/examples/1.8.x/server-ruby/examples/users/update-prefs.md new file mode 100644 index 0000000000..fbdccd7d23 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_prefs( + user_id: '<USER_ID>', + prefs: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-status.md b/docs/examples/1.8.x/server-ruby/examples/users/update-status.md new file mode 100644 index 0000000000..d73982c149 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_status( + user_id: '<USER_ID>', + status: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-target.md b/docs/examples/1.8.x/server-ruby/examples/users/update-target.md new file mode 100644 index 0000000000..dbcd1bd2f4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-target.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + identifier: '<IDENTIFIER>', # optional + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-swift/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..22020a16d9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createAnonymousSession() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-swift/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..5f541a8a15 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-email-token.md b/docs/examples/1.8.x/server-swift/examples/account/create-email-token.md new file mode 100644 index 0000000000..cf82afde8f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..fbcd50401c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let jwt = try await account.createJWT() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..27bbe4137e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..4dd91d84dd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaType = try await account.createMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..0b5d385999 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let mfaChallenge = try await account.createMfaChallenge( + factor: .email +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..a73e4f6024 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..21b54e8c9a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-swift/examples/account/create-phone-token.md new file mode 100644 index 0000000000..12b2d4b223 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-swift/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..cba0637648 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-recovery.md b/docs/examples/1.8.x/server-swift/examples/account/create-recovery.md new file mode 100644 index 0000000000..d89f679e0c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-session.md b/docs/examples/1.8.x/server-swift/examples/account/create-session.md new file mode 100644 index 0000000000..2065692a16 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-verification.md b/docs/examples/1.8.x/server-swift/examples/account/create-verification.md new file mode 100644 index 0000000000..71e9bdd32b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create.md b/docs/examples/1.8.x/server-swift/examples/account/create.md new file mode 100644 index 0000000000..79b4db64ba --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-identity.md b/docs/examples/1.8.x/server-swift/examples/account/delete-identity.md new file mode 100644 index 0000000000..f0f14b37d2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..e4209a2550 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-session.md b/docs/examples/1.8.x/server-swift/examples/account/delete-session.md new file mode 100644 index 0000000000..2469620116 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-swift/examples/account/delete-sessions.md new file mode 100644 index 0000000000..da8ac6dfe8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..69455f4acd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get-prefs.md b/docs/examples/1.8.x/server-swift/examples/account/get-prefs.md new file mode 100644 index 0000000000..6551df92e6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get-session.md b/docs/examples/1.8.x/server-swift/examples/account/get-session.md new file mode 100644 index 0000000000..63efb3f098 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get.md b/docs/examples/1.8.x/server-swift/examples/account/get.md new file mode 100644 index 0000000000..833901b5b4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-identities.md b/docs/examples/1.8.x/server-swift/examples/account/list-identities.md new file mode 100644 index 0000000000..c7ecff9962 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let identityList = try await account.listIdentities( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-logs.md b/docs/examples/1.8.x/server-swift/examples/account/list-logs.md new file mode 100644 index 0000000000..84c3327762 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let logList = try await account.listLogs( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-swift/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..a63d4d0f82 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaFactors = try await account.listMfaFactors() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-sessions.md b/docs/examples/1.8.x/server-swift/examples/account/list-sessions.md new file mode 100644 index 0000000000..49691b3a9e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-email.md b/docs/examples/1.8.x/server-swift/examples/account/update-email.md new file mode 100644 index 0000000000..48cce5055d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..ac486fceb6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..507006b230 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..fedbc954af --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateMfaAuthenticator( + type: .totp, + otp: "<OTP>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..4edb1fbbc3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.updateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..d0a2b8c686 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-name.md b/docs/examples/1.8.x/server-swift/examples/account/update-name.md new file mode 100644 index 0000000000..2c676d8714 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateName( + name: "<NAME>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-password.md b/docs/examples/1.8.x/server-swift/examples/account/update-password.md new file mode 100644 index 0000000000..62fe48e6e9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePassword( + password: "", + oldPassword: "password" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-swift/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f6776d1de1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-swift/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..a983e79c3c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-phone.md b/docs/examples/1.8.x/server-swift/examples/account/update-phone.md new file mode 100644 index 0000000000..6dd87a0ce5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-prefs.md b/docs/examples/1.8.x/server-swift/examples/account/update-prefs.md new file mode 100644 index 0000000000..53bf623469 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-recovery.md b/docs/examples/1.8.x/server-swift/examples/account/update-recovery.md new file mode 100644 index 0000000000..d655edfe59 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-session.md b/docs/examples/1.8.x/server-swift/examples/account/update-session.md new file mode 100644 index 0000000000..f2f4f7b737 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-status.md b/docs/examples/1.8.x/server-swift/examples/account/update-status.md new file mode 100644 index 0000000000..88e30cfb09 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-status.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-verification.md b/docs/examples/1.8.x/server-swift/examples/account/update-verification.md new file mode 100644 index 0000000000..61bc18cc48 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-browser.md new file mode 100644 index 0000000000..1c105c280c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..af7c2800be --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..73f54fe5d3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-flag.md new file mode 100644 index 0000000000..e33cbb0c7f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-image.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-image.md new file mode 100644 index 0000000000..5455ad18f5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-initials.md new file mode 100644 index 0000000000..63dfa5e5ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..ae4cc910ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..4530c385ca --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.createBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md new file mode 100644 index 0000000000..c3335b48cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.createCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..d14d0b5cab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.createDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md new file mode 100644 index 0000000000..4ee21048ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md new file mode 100644 index 0000000000..e4f8582f49 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.createDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..9bd30b38c9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.createEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..08023f652b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.createEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..b5126c6a50 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.createFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-index.md b/docs/examples/1.8.x/server-swift/examples/databases/create-index.md new file mode 100644 index 0000000000..7e9a6205d7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.createIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: .key, + attributes: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..20c29cd569 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.createIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..09605ba522 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.createIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..8e6c3eb84b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-relationship-attribute.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.createRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..80c321ecdb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.createStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..efd2acbc08 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.createUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create.md b/docs/examples/1.8.x/server-swift/examples/databases/create.md new file mode 100644 index 0000000000..b0362bb3e8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..88ba9ae01b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let document = try await databases.decrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..9948555981 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-collection.md new file mode 100644 index 0000000000..d61f0e658d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-document.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-document.md new file mode 100644 index 0000000000..1db59709ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-documents.md new file mode 100644 index 0000000000..d5321f2b26 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.deleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-index.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-index.md new file mode 100644 index 0000000000..ecd09f7ce6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete.md b/docs/examples/1.8.x/server-swift/examples/databases/delete.md new file mode 100644 index 0000000000..40567e4288 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.delete( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/get-attribute.md new file mode 100644 index 0000000000..30cd0c8832 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.getAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/get-collection.md new file mode 100644 index 0000000000..96c1fa0f94 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.getCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-document.md b/docs/examples/1.8.x/server-swift/examples/databases/get-document.md new file mode 100644 index 0000000000..c92856a731 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-index.md b/docs/examples/1.8.x/server-swift/examples/databases/get-index.md new file mode 100644 index 0000000000..cd59074dc8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.getIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get.md b/docs/examples/1.8.x/server-swift/examples/databases/get.md new file mode 100644 index 0000000000..875929bed0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.get( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..452b200e34 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let document = try await databases.incrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-swift/examples/databases/list-attributes.md new file mode 100644 index 0000000000..b375c8771b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeList = try await databases.listAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-collections.md b/docs/examples/1.8.x/server-swift/examples/databases/list-collections.md new file mode 100644 index 0000000000..10481d985c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collectionList = try await databases.listCollections( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/list-documents.md new file mode 100644 index 0000000000..2cac9330b3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/databases/list-indexes.md new file mode 100644 index 0000000000..691f74b076 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let indexList = try await databases.listIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list.md b/docs/examples/1.8.x/server-swift/examples/databases/list.md new file mode 100644 index 0000000000..f8a2313acc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let databaseList = try await databases.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..0d925056c2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.updateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md new file mode 100644 index 0000000000..9109990109 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.updateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..906b374946 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.updateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-document.md b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md new file mode 100644 index 0000000000..7d452db284 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/update-documents.md new file mode 100644 index 0000000000..0e934b1424 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.updateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..b485712ada --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.updateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..997b940c1b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.updateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..5f3e8da4da --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.updateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..edc0a12c8c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.updateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..e08835747c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.updateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..0fb06d7796 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.updateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..1eb3315dca --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.updateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..cd18f96368 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.updateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update.md b/docs/examples/1.8.x/server-swift/examples/databases/update.md new file mode 100644 index 0000000000..07f506257b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md new file mode 100644 index 0000000000..9c9684e42d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.upsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..e63b9a3e67 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.upsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-deployment.md new file mode 100644 index 0000000000..de3d14d242 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.fromPath("file.png"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..cadf67aa65 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md new file mode 100644 index 0000000000..aae7a0f52f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..27c5311c7a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/create-variable.md new file mode 100644 index 0000000000..d792c678e6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.createVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..5586722aab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-vcs-deployment.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createVcsDeployment( + functionId: "<FUNCTION_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create.md b/docs/examples/1.8.x/server-swift/examples/functions/create.md new file mode 100644 index 0000000000..6f17a65b93 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, + execute: ["any"], // optional + events: [], // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..dec7b1db8f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/delete-execution.md new file mode 100644 index 0000000000..e51b7dcd5c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/delete-variable.md new file mode 100644 index 0000000000..ea0ebab079 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete.md b/docs/examples/1.8.x/server-swift/examples/functions/delete.md new file mode 100644 index 0000000000..76bb48cddf --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.delete( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..1feab0f484 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let bytes = try await functions.getDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment.md new file mode 100644 index 0000000000..56ed2e8512 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.getDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/get-execution.md new file mode 100644 index 0000000000..6d24ee9390 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/get-variable.md new file mode 100644 index 0000000000..da20d68007 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.getVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get.md b/docs/examples/1.8.x/server-swift/examples/functions/get.md new file mode 100644 index 0000000000..98babdb04d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.get( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-swift/examples/functions/list-deployments.md new file mode 100644 index 0000000000..599f301ca8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deploymentList = try await functions.listDeployments( + functionId: "<FUNCTION_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-executions.md b/docs/examples/1.8.x/server-swift/examples/functions/list-executions.md new file mode 100644 index 0000000000..f0aa857f01 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "<FUNCTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-swift/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..c4a3f31174 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let runtimeList = try await functions.listRuntimes() + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-swift/examples/functions/list-specifications.md new file mode 100644 index 0000000000..1f5914ba91 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let specificationList = try await functions.listSpecifications() + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-variables.md b/docs/examples/1.8.x/server-swift/examples/functions/list-variables.md new file mode 100644 index 0000000000..0343e54772 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variableList = try await functions.listVariables( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list.md b/docs/examples/1.8.x/server-swift/examples/functions/list.md new file mode 100644 index 0000000000..370b6bddfd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let functionList = try await functions.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-swift/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..1883199655 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.updateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..5557d82f10 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.updateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/update-variable.md new file mode 100644 index 0000000000..974b2ed0ff --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.updateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update.md b/docs/examples/1.8.x/server-swift/examples/functions/update.md new file mode 100644 index 0000000000..ebb2828bc8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, // optional + execute: ["any"], // optional + events: [], // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/graphql/mutation.md b/docs/examples/1.8.x/server-swift/examples/graphql/mutation.md new file mode 100644 index 0000000000..ad33858894 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/graphql/query.md b/docs/examples/1.8.x/server-swift/examples/graphql/query.md new file mode 100644 index 0000000000..f087c888a3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/graphql/query.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-swift/examples/health/get-antivirus.md new file mode 100644 index 0000000000..5fc335f8fc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthAntivirus = try await health.getAntivirus() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-cache.md b/docs/examples/1.8.x/server-swift/examples/health/get-cache.md new file mode 100644 index 0000000000..a1c514b60e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getCache() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-certificate.md b/docs/examples/1.8.x/server-swift/examples/health/get-certificate.md new file mode 100644 index 0000000000..6adf4d6052 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthCertificate = try await health.getCertificate( + domain: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-d-b.md b/docs/examples/1.8.x/server-swift/examples/health/get-d-b.md new file mode 100644 index 0000000000..a6aeb12e44 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getDB() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-swift/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..c508106bfa --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-failed-jobs.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getFailedJobs( + name: .v1Database, + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-swift/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..9a7766c94a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getPubSub() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..8db346ccbe --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueBuilds( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..4814f29d87 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueCertificates( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..3acda3ddd7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDatabases( + name: "<NAME>", // optional + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..8be397f53f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDeletes( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..aa420409d2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueFunctions( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..dc989a510f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueLogs( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..2106b2f233 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMails( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..11cb16c5e3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMessaging( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..a0a4588b54 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMigrations( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..4eb6ba7de3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueStatsResources( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..bfaeab0b36 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueUsage( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..c315406627 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueWebhooks( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-swift/examples/health/get-storage-local.md new file mode 100644 index 0000000000..9e23c09b6d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getStorageLocal() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-storage.md b/docs/examples/1.8.x/server-swift/examples/health/get-storage.md new file mode 100644 index 0000000000..513ebac944 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-storage.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getStorage() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-time.md b/docs/examples/1.8.x/server-swift/examples/health/get-time.md new file mode 100644 index 0000000000..6624b40b22 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-time.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthTime = try await health.getTime() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get.md b/docs/examples/1.8.x/server-swift/examples/health/get.md new file mode 100644 index 0000000000..ef1ffaab6c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.get() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/get.md b/docs/examples/1.8.x/server-swift/examples/locale/get.md new file mode 100644 index 0000000000..e22f3157c7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-codes.md b/docs/examples/1.8.x/server-swift/examples/locale/list-codes.md new file mode 100644 index 0000000000..b31448a119 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-continents.md b/docs/examples/1.8.x/server-swift/examples/locale/list-continents.md new file mode 100644 index 0000000000..c75abf8a4d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..e09f3db4f7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..de360c4408 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-countries.md b/docs/examples/1.8.x/server-swift/examples/locale/list-countries.md new file mode 100644 index 0000000000..b214f9899b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-swift/examples/locale/list-currencies.md new file mode 100644 index 0000000000..a47cae696b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-languages.md b/docs/examples/1.8.x/server-swift/examples/locale/list-languages.md new file mode 100644 index 0000000000..40db7e5fe6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..5e20018fef --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-email.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-email.md new file mode 100644 index 0000000000..a1b4774228 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // optional + cc: [], // optional + bcc: [], // optional + attachments: [], // optional + draft: false, // optional + html: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..0071e477f1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [:], // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..aca295d1bd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..01503c10cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-push.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-push.md new file mode 100644 index 0000000000..498eccb51a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-push.md @@ -0,0 +1,32 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createPush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..5275f6cdb7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-sms.md new file mode 100644 index 0000000000..4f579312a9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..18d25df738 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..cb23162484 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..a787134992 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..9b12a7d8cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-topic.md new file mode 100644 index 0000000000..9429c45554 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.createTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..7421290e05 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..b6a3014391 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..94da565e1f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.deleteProvider( + providerId: "<PROVIDER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..b0aa96602f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..6676adf94e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.deleteTopic( + topicId: "<TOPIC_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete.md new file mode 100644 index 0000000000..fca66c7f43 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.delete( + messageId: "<MESSAGE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-message.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-message.md new file mode 100644 index 0000000000..b1bbf9d5f0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.getMessage( + messageId: "<MESSAGE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-provider.md new file mode 100644 index 0000000000..6ff8545bd0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.getProvider( + providerId: "<PROVIDER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..55538e073d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let subscriber = try await messaging.getSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-topic.md new file mode 100644 index 0000000000..0d2035bd9d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.getTopic( + topicId: "<TOPIC_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..b7efe6fa9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listMessageLogs( + messageId: "<MESSAGE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-messages.md new file mode 100644 index 0000000000..73832f7dae --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let messageList = try await messaging.listMessages( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..0633e15b62 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listProviderLogs( + providerId: "<PROVIDER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-providers.md new file mode 100644 index 0000000000..c24af425a6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let providerList = try await messaging.listProviders( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..eab170d7cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listSubscriberLogs( + subscriberId: "<SUBSCRIBER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..a29bcefaf1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let subscriberList = try await messaging.listSubscribers( + topicId: "<TOPIC_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-targets.md new file mode 100644 index 0000000000..974ae4f7b5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let targetList = try await messaging.listTargets( + messageId: "<MESSAGE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..e6f32ad232 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listTopicLogs( + topicId: "<TOPIC_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-topics.md new file mode 100644 index 0000000000..13106e940c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topicList = try await messaging.listTopics( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..03afe5555b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-email.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-email.md new file mode 100644 index 0000000000..1404fb8f77 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updateEmail( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + scheduledAt: "", // optional + attachments: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..c4548f6549 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [:] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..8ed28aa40e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..e4a441c561 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-push.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-push.md new file mode 100644 index 0000000000..e443161aa9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-push.md @@ -0,0 +1,32 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updatePush( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + title: "<TITLE>", // optional + body: "<BODY>", // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..d363342af8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-sms.md new file mode 100644 index 0000000000..46b225fce0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updateSms( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + content: "<CONTENT>", // optional + draft: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..7ef8f2e760 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..4475128b71 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..e412faab65 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-topic.md new file mode 100644 index 0000000000..796f581f07 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.updateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: ["any"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..7b4592b048 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..ba10ce2309 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-deployment.md new file mode 100644 index 0000000000..5730e8ef5c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createDeployment( + siteId: "<SITE_ID>", + code: InputFile.fromPath("file.png"), + activate: false, + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..0ec3804d7a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..1cb3e42030 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/create-variable.md new file mode 100644 index 0000000000..305a683fcd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.createVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..d72540e715 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-vcs-deployment.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createVcsDeployment( + siteId: "<SITE_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create.md b/docs/examples/1.8.x/server-swift/examples/sites/create.md new file mode 100644 index 0000000000..1f961d0535 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + buildRuntime: .node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: .static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..c4f6971d7f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete-log.md b/docs/examples/1.8.x/server-swift/examples/sites/delete-log.md new file mode 100644 index 0000000000..1066551495 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/delete-variable.md new file mode 100644 index 0000000000..a33e1c549e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete.md b/docs/examples/1.8.x/server-swift/examples/sites/delete.md new file mode 100644 index 0000000000..8283f70de2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.delete( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..5ed409c53b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let bytes = try await sites.getDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment.md new file mode 100644 index 0000000000..b9f04f3dfc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.getDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-log.md b/docs/examples/1.8.x/server-swift/examples/sites/get-log.md new file mode 100644 index 0000000000..1e5c8121a6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-log.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let execution = try await sites.getLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/get-variable.md new file mode 100644 index 0000000000..f9258fd5f6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.getVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get.md b/docs/examples/1.8.x/server-swift/examples/sites/get.md new file mode 100644 index 0000000000..a14a9b73e7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.get( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-swift/examples/sites/list-deployments.md new file mode 100644 index 0000000000..5516b74224 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deploymentList = try await sites.listDeployments( + siteId: "<SITE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-swift/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..13fdf9bca2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let frameworkList = try await sites.listFrameworks() + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-logs.md b/docs/examples/1.8.x/server-swift/examples/sites/list-logs.md new file mode 100644 index 0000000000..3eb2a8c096 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let executionList = try await sites.listLogs( + siteId: "<SITE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-swift/examples/sites/list-specifications.md new file mode 100644 index 0000000000..302e9ea50e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let specificationList = try await sites.listSpecifications() + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-variables.md b/docs/examples/1.8.x/server-swift/examples/sites/list-variables.md new file mode 100644 index 0000000000..9818224988 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variableList = try await sites.listVariables( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list.md b/docs/examples/1.8.x/server-swift/examples/sites/list.md new file mode 100644 index 0000000000..f330c721b9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let siteList = try await sites.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-swift/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..104058713d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.updateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..ce330e4985 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.updateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/update-variable.md new file mode 100644 index 0000000000..8385c20e90 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.updateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update.md b/docs/examples/1.8.x/server-swift/examples/sites/update.md new file mode 100644 index 0000000000..e7de2fbd17 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: .node145, // optional + adapter: .static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a664e14f5f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md @@ -0,0 +1,23 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.createBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-file.md b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md new file mode 100644 index 0000000000..540c869fab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.fromPath("file.png"), + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..2f4916dba2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let result = try await storage.deleteBucket( + bucketId: "<BUCKET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/delete-file.md b/docs/examples/1.8.x/server-swift/examples/storage/delete-file.md new file mode 100644 index 0000000000..7ac1b194e6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/get-bucket.md new file mode 100644 index 0000000000..296a27bf85 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.getBucket( + bucketId: "<BUCKET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file-download.md new file mode 100644 index 0000000000..b362b08cda --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..d8c2380b7d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file-preview.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: .center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: .jpg, // optional + token: "<TOKEN>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file-view.md new file mode 100644 index 0000000000..a3b94eec45 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file.md new file mode 100644 index 0000000000..033a643a83 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-swift/examples/storage/list-buckets.md new file mode 100644 index 0000000000..957d266e9a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucketList = try await storage.listBuckets( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/list-files.md b/docs/examples/1.8.x/server-swift/examples/storage/list-files.md new file mode 100644 index 0000000000..103d3c328c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "<BUCKET_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md new file mode 100644 index 0000000000..de3b5bf0e5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md @@ -0,0 +1,23 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.updateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-file.md b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md new file mode 100644 index 0000000000..d4d7484bd3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..1b9627afac --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnBoolean = try await tables.createBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..e002fb8042 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnDatetime = try await tables.createDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md new file mode 100644 index 0000000000..338493dbc5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEmail = try await tables.createEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..a6a9fff2c4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEnum = try await tables.createEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md new file mode 100644 index 0000000000..12e4062454 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnFloat = try await tables.createFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-index.md b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md new file mode 100644 index 0000000000..03dea1ac48 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndex = try await tables.createIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: .key, + columns: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..6c04294025 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnInteger = try await tables.createIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..2cd0b2795f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIp = try await tables.createIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..66b993cf9a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnRelationship = try await tables.createRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-row.md b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md new file mode 100644 index 0000000000..a736355127 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md new file mode 100644 index 0000000000..ee2095f08f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e83ffdf367 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnString = try await tables.createStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md new file mode 100644 index 0000000000..150b51309d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnUrl = try await tables.createUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create.md b/docs/examples/1.8.x/server-swift/examples/tables/create.md new file mode 100644 index 0000000000..0843dfd242 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.create( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..ef24324780 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let row = try await tables.decrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md new file mode 100644 index 0000000000..07f825ddbe --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.deleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md new file mode 100644 index 0000000000..b6d2e5bfea --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.deleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md new file mode 100644 index 0000000000..92bc38777e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let result = try await tables.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md new file mode 100644 index 0000000000..d27fbce85f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.deleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete.md b/docs/examples/1.8.x/server-swift/examples/tables/delete.md new file mode 100644 index 0000000000..aefa1d8cda --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.delete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-column.md b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md new file mode 100644 index 0000000000..653f79dce7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.getColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-index.md b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md new file mode 100644 index 0000000000..6835f56aa0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndex = try await tables.getIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-row.md b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md new file mode 100644 index 0000000000..e2ff10f09a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let row = try await tables.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get.md b/docs/examples/1.8.x/server-swift/examples/tables/get.md new file mode 100644 index 0000000000..610bf42529 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.get( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..6ea883d612 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let row = try await tables.incrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md new file mode 100644 index 0000000000..88c86137a4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnList = try await tables.listColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md new file mode 100644 index 0000000000..2ea8e99eca --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndexList = try await tables.listIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md new file mode 100644 index 0000000000..ca2e5b0d4b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let rowList = try await tables.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list.md b/docs/examples/1.8.x/server-swift/examples/tables/list.md new file mode 100644 index 0000000000..e135b50289 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let tableList = try await tables.list( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e0d1ea2f9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnBoolean = try await tables.updateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..f09e27920b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnDatetime = try await tables.updateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md new file mode 100644 index 0000000000..f7b8cc4ede --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEmail = try await tables.updateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..776da72e59 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEnum = try await tables.updateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md new file mode 100644 index 0000000000..d6cd34c4b5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnFloat = try await tables.updateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..e1265cedbf --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnInteger = try await tables.updateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..4f3538bb7a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIp = try await tables.updateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..74bfd62750 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnRelationship = try await tables.updateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-row.md b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md new file mode 100644 index 0000000000..7fa81f6b58 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let row = try await tables.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md new file mode 100644 index 0000000000..d7cd0697da --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.updateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md new file mode 100644 index 0000000000..ba14d9a96a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnString = try await tables.updateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md new file mode 100644 index 0000000000..19015e4c88 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnUrl = try await tables.updateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update.md b/docs/examples/1.8.x/server-swift/examples/tables/update.md new file mode 100644 index 0000000000..c9840a0a51 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.update( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md new file mode 100644 index 0000000000..c5c5b73afc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..037d927dc9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.upsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/create-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/create-membership.md new file mode 100644 index 0000000000..9010372175 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/create.md b/docs/examples/1.8.x/server-swift/examples/teams/create.md new file mode 100644 index 0000000000..71f3d70874 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/delete-membership.md new file mode 100644 index 0000000000..dbdbc96ff9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/delete.md b/docs/examples/1.8.x/server-swift/examples/teams/delete.md new file mode 100644 index 0000000000..ee9daaa55b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/get-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/get-membership.md new file mode 100644 index 0000000000..ab7b29eb3a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-swift/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ae3e9f2875 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/get.md b/docs/examples/1.8.x/server-swift/examples/teams/get.md new file mode 100644 index 0000000000..cd4b75567a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-swift/examples/teams/list-memberships.md new file mode 100644 index 0000000000..0670d91ab2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "<TEAM_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/list.md b/docs/examples/1.8.x/server-swift/examples/teams/list.md new file mode 100644 index 0000000000..b5130cbf89 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-swift/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..69fca1de74 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/update-membership.md new file mode 100644 index 0000000000..47f28e74fd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-name.md b/docs/examples/1.8.x/server-swift/examples/teams/update-name.md new file mode 100644 index 0000000000..56f5ab60db --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "<TEAM_ID>", + name: "<NAME>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-swift/examples/teams/update-prefs.md new file mode 100644 index 0000000000..b8bb200b65 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "<TEAM_ID>", + prefs: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-swift/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..2bdc123b61 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceToken = try await tokens.createFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/delete.md b/docs/examples/1.8.x/server-swift/examples/tokens/delete.md new file mode 100644 index 0000000000..8b4db1435d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let result = try await tokens.delete( + tokenId: "<TOKEN_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/get.md b/docs/examples/1.8.x/server-swift/examples/tokens/get.md new file mode 100644 index 0000000000..d6eac81059 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceToken = try await tokens.get( + tokenId: "<TOKEN_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/list.md b/docs/examples/1.8.x/server-swift/examples/tokens/list.md new file mode 100644 index 0000000000..8438050754 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/list.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceTokenList = try await tokens.list( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/update.md b/docs/examples/1.8.x/server-swift/examples/tokens/update.md new file mode 100644 index 0000000000..14bcb30f78 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/update.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceToken = try await tokens.update( + tokenId: "<TOKEN_ID>", + expire: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md new file mode 100644 index 0000000000..9b7477001d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..ad5a81fe34 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..d61adfb9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let jwt = try await users.createJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", // optional + duration: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..ffe7180c5e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..577a533fcb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.createMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..e1d8d3f3ef --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createPHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..ac42f2fe9d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: .sha1, // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..d6c67f6f3d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..16452c4606 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-session.md b/docs/examples/1.8.x/server-swift/examples/users/create-session.md new file mode 100644 index 0000000000..cf6f67bd91 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let session = try await users.createSession( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-target.md b/docs/examples/1.8.x/server-swift/examples/users/create-target.md new file mode 100644 index 0000000000..e736afcf31 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-target.md @@ -0,0 +1,19 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.createTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: .email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-token.md b/docs/examples/1.8.x/server-swift/examples/users/create-token.md new file mode 100644 index 0000000000..ca1767e178 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let token = try await users.createToken( + userId: "<USER_ID>", + length: 4, // optional + expire: 60 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create.md b/docs/examples/1.8.x/server-swift/examples/users/create.md new file mode 100644 index 0000000000..98b886005b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-identity.md b/docs/examples/1.8.x/server-swift/examples/users/delete-identity.md new file mode 100644 index 0000000000..bb3d812457 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..da2b8e091a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteMfaAuthenticator( + userId: "<USER_ID>", + type: .totp +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-session.md b/docs/examples/1.8.x/server-swift/examples/users/delete-session.md new file mode 100644 index 0000000000..c664e4f2ba --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-swift/examples/users/delete-sessions.md new file mode 100644 index 0000000000..92ab9d7748 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSessions( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-target.md b/docs/examples/1.8.x/server-swift/examples/users/delete-target.md new file mode 100644 index 0000000000..1cce56657a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete.md b/docs/examples/1.8.x/server-swift/examples/users/delete.md new file mode 100644 index 0000000000..8dfe648d6e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.delete( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..1ae285142f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.getMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get-prefs.md b/docs/examples/1.8.x/server-swift/examples/users/get-prefs.md new file mode 100644 index 0000000000..c4ae61d9dd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let preferences = try await users.getPrefs( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get-target.md b/docs/examples/1.8.x/server-swift/examples/users/get-target.md new file mode 100644 index 0000000000..100c56398d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.getTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get.md b/docs/examples/1.8.x/server-swift/examples/users/get.md new file mode 100644 index 0000000000..563042b8ef --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.get( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-identities.md b/docs/examples/1.8.x/server-swift/examples/users/list-identities.md new file mode 100644 index 0000000000..8cbe8a71f4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-identities.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let identityList = try await users.listIdentities( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-logs.md b/docs/examples/1.8.x/server-swift/examples/users/list-logs.md new file mode 100644 index 0000000000..80d9199c3e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let logList = try await users.listLogs( + userId: "<USER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-memberships.md b/docs/examples/1.8.x/server-swift/examples/users/list-memberships.md new file mode 100644 index 0000000000..0ae34d4582 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let membershipList = try await users.listMemberships( + userId: "<USER_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-swift/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..a5b5e38e12 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaFactors = try await users.listMfaFactors( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-sessions.md b/docs/examples/1.8.x/server-swift/examples/users/list-sessions.md new file mode 100644 index 0000000000..e0278279a4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let sessionList = try await users.listSessions( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-targets.md b/docs/examples/1.8.x/server-swift/examples/users/list-targets.md new file mode 100644 index 0000000000..b069781f70 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-targets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let targetList = try await users.listTargets( + userId: "<USER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list.md b/docs/examples/1.8.x/server-swift/examples/users/list.md new file mode 100644 index 0000000000..45ccf23961 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let userList = try await users.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-swift/examples/users/update-email-verification.md new file mode 100644 index 0000000000..e0de947fa2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmailVerification( + userId: "<USER_ID>", + emailVerification: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-email.md b/docs/examples/1.8.x/server-swift/examples/users/update-email.md new file mode 100644 index 0000000000..4d3c1c2db2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmail( + userId: "<USER_ID>", + email: "email@example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-labels.md b/docs/examples/1.8.x/server-swift/examples/users/update-labels.md new file mode 100644 index 0000000000..8916996b1f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateLabels( + userId: "<USER_ID>", + labels: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a6169a782c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.updateMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-mfa.md b/docs/examples/1.8.x/server-swift/examples/users/update-mfa.md new file mode 100644 index 0000000000..ad010f36b8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateMfa( + userId: "<USER_ID>", + mfa: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-name.md b/docs/examples/1.8.x/server-swift/examples/users/update-name.md new file mode 100644 index 0000000000..3735b706d8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateName( + userId: "<USER_ID>", + name: "<NAME>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-password.md b/docs/examples/1.8.x/server-swift/examples/users/update-password.md new file mode 100644 index 0000000000..3a5b804478 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePassword( + userId: "<USER_ID>", + password: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-swift/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..fffd768f5d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-phone.md b/docs/examples/1.8.x/server-swift/examples/users/update-phone.md new file mode 100644 index 0000000000..8411ad22a2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhone( + userId: "<USER_ID>", + number: "+12065550100" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-prefs.md b/docs/examples/1.8.x/server-swift/examples/users/update-prefs.md new file mode 100644 index 0000000000..c71b712df3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let preferences = try await users.updatePrefs( + userId: "<USER_ID>", + prefs: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-status.md b/docs/examples/1.8.x/server-swift/examples/users/update-status.md new file mode 100644 index 0000000000..43ecea44f6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateStatus( + userId: "<USER_ID>", + status: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-target.md b/docs/examples/1.8.x/server-swift/examples/users/update-target.md new file mode 100644 index 0000000000..579f0d282e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-target.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.updateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) + diff --git a/docs/references/databases/create-attribute-enum.md b/docs/references/databases/create-attribute-enum.md deleted file mode 100644 index 209c891d97..0000000000 --- a/docs/references/databases/create-attribute-enum.md +++ /dev/null @@ -1 +0,0 @@ -Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. diff --git a/docs/references/databases/create-boolean-column.md b/docs/references/databases/create-boolean-column.md new file mode 100644 index 0000000000..c528ede1a2 --- /dev/null +++ b/docs/references/databases/create-boolean-column.md @@ -0,0 +1 @@ +Create a boolean column. diff --git a/docs/references/databases/create-datetime-column.md b/docs/references/databases/create-datetime-column.md new file mode 100644 index 0000000000..ad92750639 --- /dev/null +++ b/docs/references/databases/create-datetime-column.md @@ -0,0 +1 @@ +Create a date time column according to the ISO 8601 standard. \ No newline at end of file diff --git a/docs/references/databases/create-email-column.md b/docs/references/databases/create-email-column.md new file mode 100644 index 0000000000..91aa5c9326 --- /dev/null +++ b/docs/references/databases/create-email-column.md @@ -0,0 +1 @@ +Create an email column. diff --git a/docs/references/databases/create-enum-attribute.md b/docs/references/databases/create-enum-attribute.md index 02ed0a5d60..0e201cf7eb 100644 --- a/docs/references/databases/create-enum-attribute.md +++ b/docs/references/databases/create-enum-attribute.md @@ -1 +1 @@ -Create an enum attribute. +Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. diff --git a/docs/references/databases/create-enum-column.md b/docs/references/databases/create-enum-column.md new file mode 100644 index 0000000000..b9e5a3ebe4 --- /dev/null +++ b/docs/references/databases/create-enum-column.md @@ -0,0 +1 @@ +Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. \ No newline at end of file diff --git a/docs/references/databases/create-float-column.md b/docs/references/databases/create-float-column.md new file mode 100644 index 0000000000..0b133eef28 --- /dev/null +++ b/docs/references/databases/create-float-column.md @@ -0,0 +1 @@ +Create a float column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/databases/create-integer-column.md b/docs/references/databases/create-integer-column.md new file mode 100644 index 0000000000..5f51b3965a --- /dev/null +++ b/docs/references/databases/create-integer-column.md @@ -0,0 +1 @@ +Create an integer column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/databases/create-ip-column.md b/docs/references/databases/create-ip-column.md new file mode 100644 index 0000000000..012431dbae --- /dev/null +++ b/docs/references/databases/create-ip-column.md @@ -0,0 +1 @@ +Create IP address column. diff --git a/docs/references/databases/create-relationship-column.md b/docs/references/databases/create-relationship-column.md new file mode 100644 index 0000000000..d87d8bccf8 --- /dev/null +++ b/docs/references/databases/create-relationship-column.md @@ -0,0 +1 @@ +Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/databases/create-row.md b/docs/references/databases/create-row.md new file mode 100644 index 0000000000..a07abfa04d --- /dev/null +++ b/docs/references/databases/create-row.md @@ -0,0 +1 @@ +Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-rows.md b/docs/references/databases/create-rows.md new file mode 100644 index 0000000000..cea67913b4 --- /dev/null +++ b/docs/references/databases/create-rows.md @@ -0,0 +1 @@ +Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-string-column.md b/docs/references/databases/create-string-column.md new file mode 100644 index 0000000000..7395e26a11 --- /dev/null +++ b/docs/references/databases/create-string-column.md @@ -0,0 +1 @@ +Create a string column. diff --git a/docs/references/databases/create-table.md b/docs/references/databases/create-table.md new file mode 100644 index 0000000000..263638ea00 --- /dev/null +++ b/docs/references/databases/create-table.md @@ -0,0 +1 @@ +Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-url-column.md b/docs/references/databases/create-url-column.md new file mode 100644 index 0000000000..e731d758ce --- /dev/null +++ b/docs/references/databases/create-url-column.md @@ -0,0 +1 @@ +Create a URL column. diff --git a/docs/references/databases/decrement-row-column.md b/docs/references/databases/decrement-row-column.md new file mode 100644 index 0000000000..b7b32d6148 --- /dev/null +++ b/docs/references/databases/decrement-row-column.md @@ -0,0 +1 @@ +Decrement a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/databases/delete-column.md b/docs/references/databases/delete-column.md new file mode 100644 index 0000000000..efba8b1d77 --- /dev/null +++ b/docs/references/databases/delete-column.md @@ -0,0 +1 @@ +Deletes a column. \ No newline at end of file diff --git a/docs/references/databases/delete-row.md b/docs/references/databases/delete-row.md new file mode 100644 index 0000000000..c0b9dfbdaf --- /dev/null +++ b/docs/references/databases/delete-row.md @@ -0,0 +1 @@ +Delete a row by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/delete-rows.md b/docs/references/databases/delete-rows.md new file mode 100644 index 0000000000..9d5189ce76 --- /dev/null +++ b/docs/references/databases/delete-rows.md @@ -0,0 +1 @@ +Bulk delete rows using queries, if no queries are passed then all rows are deleted. \ No newline at end of file diff --git a/docs/references/databases/delete-table.md b/docs/references/databases/delete-table.md new file mode 100644 index 0000000000..ad74ca3233 --- /dev/null +++ b/docs/references/databases/delete-table.md @@ -0,0 +1 @@ +Delete a table by its unique ID. Only users with write permissions have access to delete this resource. \ No newline at end of file diff --git a/docs/references/databases/get-column.md b/docs/references/databases/get-column.md new file mode 100644 index 0000000000..cd8b8797a9 --- /dev/null +++ b/docs/references/databases/get-column.md @@ -0,0 +1 @@ +Get column by ID. \ No newline at end of file diff --git a/docs/references/databases/get-row-logs.md b/docs/references/databases/get-row-logs.md new file mode 100644 index 0000000000..1d494ed53e --- /dev/null +++ b/docs/references/databases/get-row-logs.md @@ -0,0 +1 @@ +Get the row activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/get-row.md b/docs/references/databases/get-row.md new file mode 100644 index 0000000000..6a30fa472c --- /dev/null +++ b/docs/references/databases/get-row.md @@ -0,0 +1 @@ +Get a row by its unique ID. This endpoint response returns a JSON object with the row data. \ No newline at end of file diff --git a/docs/references/databases/get-table-logs.md b/docs/references/databases/get-table-logs.md new file mode 100644 index 0000000000..8b00c7f317 --- /dev/null +++ b/docs/references/databases/get-table-logs.md @@ -0,0 +1 @@ +Get the table activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/get-table-usage.md b/docs/references/databases/get-table-usage.md new file mode 100644 index 0000000000..08e28af0a6 --- /dev/null +++ b/docs/references/databases/get-table-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/get-table.md b/docs/references/databases/get-table.md new file mode 100644 index 0000000000..67b8428431 --- /dev/null +++ b/docs/references/databases/get-table.md @@ -0,0 +1 @@ +Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. \ No newline at end of file diff --git a/docs/references/databases/get-usage.md b/docs/references/databases/get-usage.md deleted file mode 100644 index d41f8704c8..0000000000 --- a/docs/references/databases/get-usage.md +++ /dev/null @@ -1 +0,0 @@ -Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/increment-row-column.md b/docs/references/databases/increment-row-column.md new file mode 100644 index 0000000000..7a19b3fbc7 --- /dev/null +++ b/docs/references/databases/increment-row-column.md @@ -0,0 +1 @@ +Increment a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/databases/list-columns.md b/docs/references/databases/list-columns.md new file mode 100644 index 0000000000..aacf373082 --- /dev/null +++ b/docs/references/databases/list-columns.md @@ -0,0 +1 @@ +List columns in the table. \ No newline at end of file diff --git a/docs/references/databases/list-rows.md b/docs/references/databases/list-rows.md new file mode 100644 index 0000000000..68185fc192 --- /dev/null +++ b/docs/references/databases/list-rows.md @@ -0,0 +1 @@ +Get a list of all the user's rows in a given table. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/databases/list-tables.md b/docs/references/databases/list-tables.md new file mode 100644 index 0000000000..e14795eeac --- /dev/null +++ b/docs/references/databases/list-tables.md @@ -0,0 +1 @@ +Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/databases/list-usage.md b/docs/references/databases/list-usage.md new file mode 100644 index 0000000000..0f318d6466 --- /dev/null +++ b/docs/references/databases/list-usage.md @@ -0,0 +1 @@ +List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections/tables, documents/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/update-boolean-column.md b/docs/references/databases/update-boolean-column.md new file mode 100644 index 0000000000..f5167d97b6 --- /dev/null +++ b/docs/references/databases/update-boolean-column.md @@ -0,0 +1 @@ +Update a boolean column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/databases/update-datetime-column.md b/docs/references/databases/update-datetime-column.md new file mode 100644 index 0000000000..e793b41921 --- /dev/null +++ b/docs/references/databases/update-datetime-column.md @@ -0,0 +1 @@ +Update a date time column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/databases/update-email-column.md b/docs/references/databases/update-email-column.md new file mode 100644 index 0000000000..0db17e29bd --- /dev/null +++ b/docs/references/databases/update-email-column.md @@ -0,0 +1 @@ +Update an email column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-enum-column.md b/docs/references/databases/update-enum-column.md new file mode 100644 index 0000000000..df172cbc38 --- /dev/null +++ b/docs/references/databases/update-enum-column.md @@ -0,0 +1 @@ +Update an enum column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-float-column.md b/docs/references/databases/update-float-column.md new file mode 100644 index 0000000000..4e0eb9ddb2 --- /dev/null +++ b/docs/references/databases/update-float-column.md @@ -0,0 +1 @@ +Update a float column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-integer-column.md b/docs/references/databases/update-integer-column.md new file mode 100644 index 0000000000..0f2a07ea6e --- /dev/null +++ b/docs/references/databases/update-integer-column.md @@ -0,0 +1 @@ +Update an integer column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-ip-column.md b/docs/references/databases/update-ip-column.md new file mode 100644 index 0000000000..115c87a7e1 --- /dev/null +++ b/docs/references/databases/update-ip-column.md @@ -0,0 +1 @@ +Update an ip column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-relationship-column.md b/docs/references/databases/update-relationship-column.md new file mode 100644 index 0000000000..dfdcd8ae5a --- /dev/null +++ b/docs/references/databases/update-relationship-column.md @@ -0,0 +1 @@ +Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/databases/update-row.md b/docs/references/databases/update-row.md new file mode 100644 index 0000000000..b532ea411d --- /dev/null +++ b/docs/references/databases/update-row.md @@ -0,0 +1 @@ +Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/docs/references/databases/update-rows.md b/docs/references/databases/update-rows.md new file mode 100644 index 0000000000..334b91aec1 --- /dev/null +++ b/docs/references/databases/update-rows.md @@ -0,0 +1 @@ +Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/references/databases/update-string-column.md b/docs/references/databases/update-string-column.md new file mode 100644 index 0000000000..617214b4c9 --- /dev/null +++ b/docs/references/databases/update-string-column.md @@ -0,0 +1 @@ +Update a string column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-table.md b/docs/references/databases/update-table.md new file mode 100644 index 0000000000..bbd676d3b8 --- /dev/null +++ b/docs/references/databases/update-table.md @@ -0,0 +1 @@ +Update a table by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/update-url-column.md b/docs/references/databases/update-url-column.md new file mode 100644 index 0000000000..6080d71509 --- /dev/null +++ b/docs/references/databases/update-url-column.md @@ -0,0 +1 @@ +Update an url column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/upsert-row.md b/docs/references/databases/upsert-row.md new file mode 100644 index 0000000000..1132afd53c --- /dev/null +++ b/docs/references/databases/upsert-row.md @@ -0,0 +1 @@ +Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/upsert-rows.md b/docs/references/databases/upsert-rows.md new file mode 100644 index 0000000000..21aa3da1ef --- /dev/null +++ b/docs/references/databases/upsert-rows.md @@ -0,0 +1 @@ +Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 99d540a4c2..76478a505f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -47,7 +47,7 @@ class Create extends Action namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-attribute-enum.md', + description: '/docs/references/databases/create-enum-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index 30972e8458..e0f1992ccb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -40,7 +40,7 @@ class Create extends BooleanCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-boolean-attribute.md', + description: '/docs/references/databases/create-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -50,7 +50,7 @@ class Create extends BooleanCreate ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') ->param('default', null, new Boolean(), 'Default value for column when not provided. Cannot be set when column is required.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index 82e7d9526d..888f31d9bd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -42,7 +42,7 @@ class Update extends BooleanUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-boolean-attribute.md', + description: '/docs/references/databases/update-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -53,7 +53,7 @@ class Update extends BooleanUpdate contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') ->param('default', null, new Nullable(new Boolean()), 'Default value for column when not provided. Cannot be set when column is required.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index 44e9cf9cd3..63110c9c6a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -42,7 +42,7 @@ class Create extends DatetimeCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-datetime-attribute.md', + description: '/docs/references/databases/create-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 27f5f3e82b..33c8ff9f94 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -44,7 +44,7 @@ class Update extends DatetimeUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-datetime-attribute.md', + description: '/docs/references/databases/update-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index ce3e66a85f..923ae3ee24 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -41,7 +41,7 @@ class Delete extends AttributesDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-attribute.md', + description: '/docs/references/databases/delete-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index c497b9d78c..fe4170c74e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -41,7 +41,7 @@ class Create extends EmailCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-email-attribute.md', + description: '/docs/references/databases/create-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index 267d5b80e7..8f4fd5ca8f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -43,7 +43,7 @@ class Update extends EmailUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-email-attribute.md', + description: '/docs/references/databases/update-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index 38b7ac231a..f64ededb8f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -43,7 +43,7 @@ class Create extends EnumCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-attribute-enum.md', + description: '/docs/references/databases/create-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index 97785b1121..77bd07bdcd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -45,7 +45,7 @@ class Update extends EnumUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-enum-attribute.md', + description: '/docs/references/databases/update-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 4a96165b32..ce7d55c880 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -41,7 +41,7 @@ class Create extends FloatCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-float-attribute.md', + description: '/docs/references/databases/create-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index d570ce4857..31f4bd61ec 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -43,7 +43,7 @@ class Update extends FloatUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-float-attribute.md', + description: '/docs/references/databases/update-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index 85ac43b63d..24071db6b1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -47,7 +47,7 @@ class Get extends AttributesGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-attribute.md', + description: '/docs/references/databases/get-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index 874c0f2132..fcaf3f0a8b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -41,7 +41,7 @@ class Create extends IPCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-ip-attribute.md', + description: '/docs/references/databases/create-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index 73a73bccac..38759e4654 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -43,7 +43,7 @@ class Update extends IPUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-ip-attribute.md', + description: '/docs/references/databases/update-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 11a36c1e3c..67848f7ef9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -41,7 +41,7 @@ class Create extends IntegerCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-integer-attribute.md', + description: '/docs/references/databases/create-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index 292eb3de7b..27779abe3b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -43,7 +43,7 @@ class Update extends IntegerUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-integer-attribute.md', + description: '/docs/references/databases/update-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 583f8bb16c..f1a0fd9601 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -42,7 +42,7 @@ class Create extends RelationshipCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-relationship-attribute.md', + description: '/docs/references/databases/create-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index d17cf9def2..1385e157de 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -42,7 +42,7 @@ class Update extends RelationshipUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-relationship-attribute.md', + description: '/docs/references/databases/update-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index 9d86fc8c8e..2dc1466a67 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -43,7 +43,7 @@ class Create extends StringCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-string-attribute.md', + description: '/docs/references/databases/create-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -53,7 +53,7 @@ class Create extends StringCreate ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') ->param('required', null, new Boolean(), 'Is column required?') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index 8106ccf626..9e1034dbcc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -45,7 +45,7 @@ class Update extends StringUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-string-attribute.md', + description: '/docs/references/databases/update-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( @@ -56,7 +56,7 @@ class Update extends StringUpdate contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for column when not provided. Cannot be set when column is required.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index 340b120c5c..65b1387a11 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -41,7 +41,7 @@ class Create extends URLCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-url-attribute.md', + description: '/docs/references/databases/create-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index 82ab8fa614..34fc77ac42 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -43,7 +43,7 @@ class Update extends URLUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-url-attribute.md', + description: '/docs/references/databases/update-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index b80cf4f773..1fee8fc840 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -43,7 +43,7 @@ class Create extends CollectionCreate namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/create-collection.md', + description: '/docs/references/databases/create-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index 2465496023..ef0478c042 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -39,7 +39,7 @@ class Delete extends CollectionDelete namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/delete-collection.md', + description: '/docs/references/databases/delete-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index dec3a879a4..1cc147f04d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -36,7 +36,7 @@ class Get extends CollectionGet namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/get-collection.md', + description: '/docs/references/databases/get-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index 92397cd460..a83bb3dc44 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -56,7 +56,7 @@ class Create extends IndexCreate contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', null, new Key(), 'Index Key.') ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index 0fec37eec3..a1d2fd5fce 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -55,7 +55,7 @@ class Delete extends IndexDelete contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index 9a63fa79c3..cb8ef92a80 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -48,7 +48,7 @@ class Get extends IndexGet contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 85685cdd6c..78b2c8874f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -48,7 +48,7 @@ class XList extends IndexXList contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('queries', [], new Indexes(), '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. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index d18cae9d6d..63c53cf2bd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -33,7 +33,7 @@ class XList extends CollectionLogXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'listLogs', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/get-collection-logs.md', + description: '/docs/references/databases/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php index a29d73aeee..30aad96db8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php @@ -43,7 +43,7 @@ class Delete extends DocumentsDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-documents.md', + description: '/docs/references/databases/delete-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( @@ -54,7 +54,7 @@ class Delete extends DocumentsDelete contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->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('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php index 529d4b0b96..4a862b1807 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php @@ -44,7 +44,7 @@ class Update extends DocumentsUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-documents.md', + description: '/docs/references/databases/update-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php index 2bda5f0172..db87daed89 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php @@ -44,7 +44,7 @@ class Upsert extends DocumentsUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-documents.md', + description: '/docs/references/databases/upsert-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php index a0761f0bd2..e9eb81aab8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php @@ -44,7 +44,7 @@ class Decrement extends DecrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/decrement-document-attribute.md', + description: '/docs/references/databases/decrement-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php index d28b2a3968..a30618ea62 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php @@ -44,7 +44,7 @@ class Increment extends IncrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/increment-document-attribute.md', + description: '/docs/references/databases/increment-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index bba4960b69..3fc8a30bfd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -53,7 +53,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-document.md', + description: '/docs/references/databases/create-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -74,7 +74,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: $this->getBulkActionName(self::getName()), - description: '/docs/references/databases/create-documents.md', + description: '/docs/references/databases/create-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( @@ -92,7 +92,7 @@ class Create extends DocumentCreate ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('rowId', '', new CustomId(), 'Row 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('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows.') ->param('data', [], new JSON(), 'Row 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) ->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan']) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index 22c25d5b16..36c8aefbc6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -48,7 +48,7 @@ class Delete extends DocumentDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-document.md', + description: '/docs/references/databases/delete-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -59,7 +59,7 @@ class Delete extends DocumentDelete contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('rowId', '', new UID(), 'Row ID.') ->inject('requestTimestamp') ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 0266781728..b821d01ebe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -38,7 +38,7 @@ class Get extends DocumentGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-document.md', + description: '/docs/references/databases/get-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -49,7 +49,7 @@ class Get extends DocumentGet contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('rowId', '', new UID(), 'Row ID.') ->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('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index ad42f16f44..b279e96381 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -33,7 +33,7 @@ class XList extends DocumentLogXList namespace: $this->getSdkNamespace(), group: 'logs', name: self::getName(), - description: '/docs/references/databases/get-document-logs.md', + description: '/docs/references/databases/get-row-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -44,7 +44,7 @@ class XList extends DocumentLogXList contentType: ContentType::JSON, )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->param('rowId', '', new UID(), 'Row ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index 15796c3b6b..77cf531a4f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -45,7 +45,7 @@ class Update extends DocumentUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-document.md', + description: '/docs/references/databases/update-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index 42a79e8a72..c442b40e0f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -46,7 +46,7 @@ class Upsert extends DocumentUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-document.md', + description: '/docs/references/databases/upsert-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index 7e942f4842..244a4afdb9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -38,7 +38,7 @@ class XList extends DocumentXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/list-documents.md', + description: '/docs/references/databases/list-rows.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -49,7 +49,7 @@ class XList extends DocumentXList contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->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('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index b19dc143b9..f5400366fd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -42,7 +42,7 @@ class Update extends CollectionUpdate namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/update-collection.md', + description: '/docs/references/databases/update-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index cede0762d8..9f51a82734 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -36,8 +36,8 @@ class Get extends CollectionUsageGet ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, - name: self::getName(), - description: '/docs/references/databases/get-collection-usage.md', + name: 'getUsage', // getName needs to be different from parent action to avoid conflict in path name + description: '/docs/references/databases/get-table-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -49,7 +49,7 @@ class Get extends CollectionUsageGet )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) - ->param('tableId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index 24034f7f0a..361ab2020f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -38,7 +38,7 @@ class XList extends CollectionXList namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/list-collections.md', + description: '/docs/references/databases/list-tables.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 5482d25269..56fcc29688 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -22,7 +22,7 @@ class Get extends Action { public static function getName(): string { - return 'getUsage'; + return 'getDatabaseUsage'; } public function __construct() @@ -37,7 +37,7 @@ class Get extends Action ->label('sdk', new Method( namespace: 'databases', group: null, - name: 'getUsage', + name: self::getName(), description: '/docs/references/databases/get-database-usage.md', auth: [AuthType::ADMIN], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index fd3a95cd24..b5c898fd1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -20,7 +20,7 @@ class XList extends Action { public static function getName(): string { - return 'listUsages'; + return 'listUsage'; } public function __construct() @@ -35,8 +35,8 @@ class XList extends Action ->label('sdk', new Method( namespace: 'databases', group: null, - name: 'listUsages', - description: '/docs/references/databases/get-usage.md', + name: self::getName(), + description: '/docs/references/databases/list-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index af3b5c017e..a8b71e0810 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -172,7 +172,8 @@ abstract class Format break; case 'databases': switch ($method) { - case 'getUsage': + /*case 'getUsage':*/ + case 'listUsage': case 'getCollectionUsage': case 'getDatabaseUsage': switch ($param) { @@ -203,6 +204,37 @@ abstract class Format } } break; + case 'tables': + switch ($method) { + case 'getUsage': + switch ($param) { + case 'range': + return 'DatabaseUsageRange'; + } + break; + case 'createRelationshipColumn': + switch ($param) { + case 'type': + return 'RelationshipType'; + case 'onDelete': + return 'RelationMutate'; + } + break; + case 'updateRelationshipColumn': + switch ($param) { + case 'onDelete': + return 'RelationMutate'; + } + break; + case 'createIndex': + switch ($param) { + case 'type': + return 'IndexType'; + case 'orders': + return 'OrderBy'; + } + } + break; case 'functions': switch ($method) { case 'getUsage': @@ -413,6 +445,7 @@ abstract class Format } return null; } + public function getEnumKeys(string $service, string $method, string $param): array { $values = []; @@ -441,13 +474,22 @@ abstract class Format break; case 'databases': switch ($method) { - case 'getUsage': + /*case 'getUsage':*/ + case 'listUsage': + case 'getTableUsage': case 'getCollectionUsage': case 'getDatabaseUsage': // Range Enum Keys return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; } break; + case 'tables': + switch ($method) { + case 'getUsage': + // Range Enum Keys + return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; + } + break; case 'proxy': switch ($method) { case 'createRedirectRule': @@ -460,15 +502,8 @@ abstract class Format break; } break; - case 'functions': - switch ($method) { - case 'getUsage': - case 'listUsage': - // Range Enum Keys - return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; - } - break; case 'sites': + case 'functions': switch ($method) { case 'getUsage': case 'listUsage':