diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6d73787d00..262c79ab3d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: sudo apt update sudo apt install oha - name: Benchmark PR - run: 'oha -z 180s http://localhost/v1/health/version -j > benchmark.json' + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark.json' - name: Cleaning run: docker compose down -v - name: Installing latest version @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: oha -z 180s http://localhost/v1/health/version -j > benchmark-latest.json + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark-latest.json' - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt diff --git a/app/config/roles.php b/app/config/roles.php index bccc2837f5..4b06e0a6c1 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -14,6 +14,8 @@ $member = [ 'teams.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'projects.read', @@ -37,6 +39,8 @@ $admins = [ 'teams.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'buckets.read', @@ -47,6 +51,8 @@ $admins = [ 'databases.write', 'collections.read', 'collections.write', + 'tables.read', + 'tables.write', 'platforms.read', 'platforms.write', 'projects.write', @@ -97,6 +103,8 @@ return [ 'sessions.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'locale.read', diff --git a/app/config/scopes.php b/app/config/scopes.php index 7dea7b1cd5..d90ca2eabf 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -28,12 +28,24 @@ return [ // List of publicly visible scopes 'collections.write' => [ 'description' => 'Access to create, update, and delete your project\'s database collections', ], + 'tables.read' => [ + 'description' => 'Access to read your project\'s database tables', + ], + 'tables.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database tables', + ], 'attributes.read' => [ 'description' => 'Access to read your project\'s database collection\'s attributes', ], 'attributes.write' => [ 'description' => 'Access to create, update, and delete your project\'s database collection\'s attributes', ], + 'columns.read' => [ + 'description' => 'Access to read your project\'s database table\'s columns', + ], + 'columns.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database table\'s columns', + ], 'indexes.read' => [ 'description' => 'Access to read your project\'s database collection\'s indexes', ], @@ -46,6 +58,12 @@ return [ // List of publicly visible scopes 'documents.write' => [ 'description' => 'Access to create, update, and delete your project\'s database documents', ], + 'rows.read' => [ + 'description' => 'Access to read your project\'s database rows', + ], + 'rows.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database rows', + ], 'files.read' => [ 'description' => 'Access to read your project\'s storage files and preview images', ], 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 537f8e048c..f45a5bc70e 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -5032,7 +5032,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5063,7 +5063,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -5117,7 +5117,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5202,7 +5202,7 @@ }, { "name": "tableId", - "description": "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.", + "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", @@ -5282,7 +5282,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5313,7 +5313,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -5377,7 +5377,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5502,7 +5502,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5601,7 +5601,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5632,7 +5632,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", 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 46db5b5ce4..9ecb607bd6 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4674,11 +4674,11 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "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": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.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}", @@ -4730,8 +4730,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" @@ -9845,7 +9849,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9928,7 +9932,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10032,7 +10036,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10101,7 +10105,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10200,7 +10204,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10271,7 +10275,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10355,7 +10359,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10383,7 +10387,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -10461,7 +10465,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10489,7 +10493,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -10572,7 +10576,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10678,7 +10682,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10789,7 +10793,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10895,7 +10899,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11006,7 +11010,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11121,7 +11125,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11241,7 +11245,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11357,7 +11361,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11478,7 +11482,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11594,7 +11598,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11715,7 +11719,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11821,7 +11825,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11932,7 +11936,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11990,7 +11994,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -12017,7 +12021,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12063,7 +12067,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12091,7 +12095,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12180,7 +12184,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12208,7 +12212,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12296,7 +12300,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12402,7 +12406,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12544,7 +12548,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12615,7 +12619,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12695,7 +12699,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12756,7 +12760,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12803,7 +12807,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12831,7 +12835,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12885,7 +12889,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12913,7 +12917,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12942,7 +12946,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -13013,7 +13017,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -13041,7 +13045,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13084,7 +13088,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13112,7 +13116,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13135,9 +13139,9 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13153,18 +13157,18 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13247,7 +13251,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13278,7 +13282,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13332,7 +13336,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13417,7 +13421,7 @@ }, { "name": "tableId", - "description": "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.", + "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", @@ -13495,7 +13499,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13605,7 +13609,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13699,7 +13703,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13728,7 +13732,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13790,7 +13794,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13821,7 +13825,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13885,7 +13889,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14010,7 +14014,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14109,7 +14113,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14140,7 +14144,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -14193,7 +14197,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14220,7 +14224,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -14286,7 +14290,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14398,7 +14402,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14481,7 +14485,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "tags": [ "tables" ], @@ -14499,18 +14503,18 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -14547,15 +14551,19 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -14569,7 +14577,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "tags": [ "databases" ], @@ -14587,13 +14595,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, 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 3979ce1ce0..6a4cefcaf9 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -9006,7 +9006,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9090,7 +9090,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9195,7 +9195,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9265,7 +9265,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9365,7 +9365,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9437,7 +9437,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9522,7 +9522,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9551,7 +9551,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -9629,7 +9629,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9658,7 +9658,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -9741,7 +9741,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9848,7 +9848,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9960,7 +9960,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10067,7 +10067,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10179,7 +10179,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10295,7 +10295,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10416,7 +10416,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10533,7 +10533,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10655,7 +10655,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10772,7 +10772,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10894,7 +10894,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11001,7 +11001,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11113,7 +11113,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11172,7 +11172,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11199,7 +11199,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11245,7 +11245,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11274,7 +11274,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -11363,7 +11363,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11392,7 +11392,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -11480,7 +11480,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11587,7 +11587,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11730,7 +11730,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11802,7 +11802,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11883,7 +11883,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11945,7 +11945,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -11992,7 +11992,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12021,7 +12021,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12075,7 +12075,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12104,7 +12104,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12133,7 +12133,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -12204,7 +12204,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12233,7 +12233,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12276,7 +12276,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12305,7 +12305,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12357,7 +12357,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12390,7 +12390,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12444,7 +12444,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12531,7 +12531,7 @@ }, { "name": "tableId", - "description": "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.", + "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", @@ -12609,7 +12609,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12720,7 +12720,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12815,7 +12815,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12845,7 +12845,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12907,7 +12907,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12940,7 +12940,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13004,7 +13004,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13131,7 +13131,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13232,7 +13232,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13265,7 +13265,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13318,7 +13318,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13431,7 +13431,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 58917b543a..3520fa9d9e 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -5026,7 +5026,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5057,7 +5057,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -5111,7 +5111,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5196,7 +5196,7 @@ }, { "name": "tableId", - "description": "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.", + "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", @@ -5276,7 +5276,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5307,7 +5307,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -5371,7 +5371,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5496,7 +5496,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5595,7 +5595,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5626,7 +5626,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 77b8b42436..b6e1971407 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4674,11 +4674,11 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "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": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.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}", @@ -4730,8 +4730,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" @@ -9800,7 +9804,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9883,7 +9887,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9987,7 +9991,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10056,7 +10060,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10155,7 +10159,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10226,7 +10230,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10310,7 +10314,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10338,7 +10342,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -10416,7 +10420,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10444,7 +10448,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -10527,7 +10531,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10633,7 +10637,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10744,7 +10748,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10850,7 +10854,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10961,7 +10965,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11076,7 +11080,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11196,7 +11200,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11312,7 +11316,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11433,7 +11437,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11549,7 +11553,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11670,7 +11674,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11776,7 +11780,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11887,7 +11891,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11945,7 +11949,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11972,7 +11976,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12018,7 +12022,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12046,7 +12050,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12135,7 +12139,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12163,7 +12167,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12251,7 +12255,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12357,7 +12361,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12499,7 +12503,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12570,7 +12574,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12650,7 +12654,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12711,7 +12715,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12758,7 +12762,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12786,7 +12790,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12840,7 +12844,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12868,7 +12872,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12897,7 +12901,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -12968,7 +12972,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12996,7 +13000,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13039,7 +13043,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13067,7 +13071,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13090,9 +13094,9 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13108,18 +13112,18 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13202,7 +13206,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13233,7 +13237,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13287,7 +13291,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13372,7 +13376,7 @@ }, { "name": "tableId", - "description": "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.", + "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", @@ -13450,7 +13454,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13560,7 +13564,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13654,7 +13658,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13683,7 +13687,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13745,7 +13749,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13776,7 +13780,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13840,7 +13844,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13965,7 +13969,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14064,7 +14068,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14095,7 +14099,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -14148,7 +14152,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14175,7 +14179,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -14241,7 +14245,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14353,7 +14357,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14436,7 +14440,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "tags": [ "tables" ], @@ -14454,18 +14458,18 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -14502,15 +14506,19 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -14524,7 +14532,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "tags": [ "databases" ], @@ -14542,13 +14550,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index a4e905fda7..90b49ae65c 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -8963,7 +8963,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9047,7 +9047,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9152,7 +9152,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9222,7 +9222,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9322,7 +9322,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9394,7 +9394,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9479,7 +9479,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9508,7 +9508,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -9586,7 +9586,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9615,7 +9615,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -9698,7 +9698,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9805,7 +9805,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9917,7 +9917,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10024,7 +10024,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10136,7 +10136,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10252,7 +10252,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10373,7 +10373,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10490,7 +10490,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10612,7 +10612,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10729,7 +10729,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10851,7 +10851,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10958,7 +10958,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11070,7 +11070,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11129,7 +11129,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11156,7 +11156,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11202,7 +11202,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11231,7 +11231,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -11320,7 +11320,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11349,7 +11349,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -11437,7 +11437,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11544,7 +11544,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11687,7 +11687,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11759,7 +11759,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11840,7 +11840,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11902,7 +11902,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -11949,7 +11949,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11978,7 +11978,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12032,7 +12032,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12061,7 +12061,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12090,7 +12090,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -12161,7 +12161,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12190,7 +12190,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12233,7 +12233,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12262,7 +12262,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12314,7 +12314,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12347,7 +12347,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12401,7 +12401,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12488,7 +12488,7 @@ }, { "name": "tableId", - "description": "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.", + "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", @@ -12566,7 +12566,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12677,7 +12677,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12772,7 +12772,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12802,7 +12802,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12864,7 +12864,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12897,7 +12897,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -12961,7 +12961,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13088,7 +13088,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13189,7 +13189,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13222,7 +13222,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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", @@ -13275,7 +13275,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13388,7 +13388,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index efb39032ae..445f8b5385 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -5159,7 +5159,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5188,7 +5188,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -5241,7 +5241,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5324,7 +5324,7 @@ }, { "name": "tableId", - "description": "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.", + "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": "", @@ -5404,7 +5404,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5433,7 +5433,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -5494,7 +5494,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5615,7 +5615,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5712,7 +5712,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5741,7 +5741,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 2f28c224e6..8bca9a6c0f 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4843,7 +4843,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "operationId": "databasesListUsage", "consumes": [], "produces": [ "application\/json" @@ -4851,7 +4851,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 +4861,14 @@ } }, "x-appwrite": { - "method": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.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}", @@ -4898,8 +4898,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" } @@ -9902,7 +9906,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9982,7 +9986,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10087,7 +10091,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10154,7 +10158,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10255,7 +10259,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10322,7 +10326,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10403,7 +10407,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10429,7 +10433,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -10509,7 +10513,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10535,7 +10539,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -10617,7 +10621,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10723,7 +10727,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10831,7 +10835,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10937,7 +10941,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11045,7 +11049,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11161,7 +11165,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11279,7 +11283,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11397,7 +11401,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11517,7 +11521,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11635,7 +11639,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11755,7 +11759,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11861,7 +11865,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11969,7 +11973,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12024,7 +12028,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -12055,7 +12059,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12102,7 +12106,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12128,7 +12132,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12221,7 +12225,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12247,7 +12251,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12335,7 +12339,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12441,7 +12445,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12578,7 +12582,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12647,7 +12651,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12723,7 +12727,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12778,7 +12782,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12825,7 +12829,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12851,7 +12855,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12904,7 +12908,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12930,7 +12934,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12958,7 +12962,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -13031,7 +13035,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -13057,7 +13061,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13100,7 +13104,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13126,7 +13130,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13145,13 +13149,13 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13163,18 +13167,18 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13252,7 +13256,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13281,7 +13285,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13334,7 +13338,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13417,7 +13421,7 @@ }, { "name": "tableId", - "description": "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.", + "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": "", @@ -13497,7 +13501,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13604,7 +13608,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13696,7 +13700,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13723,7 +13727,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13782,7 +13786,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13811,7 +13815,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13872,7 +13876,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13993,7 +13997,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14090,7 +14094,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14119,7 +14123,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -14168,7 +14172,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14193,7 +14197,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "", @@ -14256,7 +14260,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14362,7 +14366,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14437,7 +14441,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -14455,18 +14459,18 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -14500,14 +14504,18 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "", @@ -14519,7 +14527,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "consumes": [], "produces": [ "application\/json" @@ -14537,13 +14545,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 53f71bea44..a2d7cb03d7 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -9074,7 +9074,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9155,7 +9155,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9261,7 +9261,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9329,7 +9329,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9431,7 +9431,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9499,7 +9499,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9581,7 +9581,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9608,7 +9608,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -9688,7 +9688,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9715,7 +9715,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -9797,7 +9797,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9904,7 +9904,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10013,7 +10013,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10120,7 +10120,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10229,7 +10229,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10346,7 +10346,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10465,7 +10465,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10584,7 +10584,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10705,7 +10705,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10824,7 +10824,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10945,7 +10945,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11052,7 +11052,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11161,7 +11161,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11217,7 +11217,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11248,7 +11248,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11295,7 +11295,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11322,7 +11322,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -11415,7 +11415,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11442,7 +11442,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -11530,7 +11530,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11637,7 +11637,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11775,7 +11775,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11845,7 +11845,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11922,7 +11922,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11978,7 +11978,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12025,7 +12025,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12052,7 +12052,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12105,7 +12105,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12132,7 +12132,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12160,7 +12160,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -12233,7 +12233,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12260,7 +12260,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12303,7 +12303,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12330,7 +12330,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12378,7 +12378,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12409,7 +12409,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12462,7 +12462,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12547,7 +12547,7 @@ }, { "name": "tableId", - "description": "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.", + "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": "", @@ -12627,7 +12627,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12735,7 +12735,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12828,7 +12828,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12856,7 +12856,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12915,7 +12915,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12946,7 +12946,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13007,7 +13007,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13130,7 +13130,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13229,7 +13229,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13260,7 +13260,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13311,7 +13311,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13418,7 +13418,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 84445b4af5..b641397258 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -5153,7 +5153,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5182,7 +5182,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -5235,7 +5235,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5318,7 +5318,7 @@ }, { "name": "tableId", - "description": "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.", + "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": "", @@ -5398,7 +5398,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5427,7 +5427,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -5488,7 +5488,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5609,7 +5609,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5706,7 +5706,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5735,7 +5735,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 4ac2c7b317..85836ff2b8 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4843,7 +4843,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "operationId": "databasesListUsage", "consumes": [], "produces": [ "application\/json" @@ -4851,7 +4851,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 +4861,14 @@ } }, "x-appwrite": { - "method": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.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}", @@ -4898,8 +4898,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" } @@ -9857,7 +9861,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9937,7 +9941,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10042,7 +10046,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10109,7 +10113,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10210,7 +10214,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10277,7 +10281,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10358,7 +10362,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10384,7 +10388,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -10464,7 +10468,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10490,7 +10494,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -10572,7 +10576,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10678,7 +10682,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10786,7 +10790,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10892,7 +10896,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11000,7 +11004,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11116,7 +11120,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11234,7 +11238,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11352,7 +11356,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11472,7 +11476,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11590,7 +11594,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11710,7 +11714,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11816,7 +11820,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11924,7 +11928,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11979,7 +11983,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -12010,7 +12014,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12057,7 +12061,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12083,7 +12087,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12176,7 +12180,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12202,7 +12206,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12290,7 +12294,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12396,7 +12400,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12533,7 +12537,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12602,7 +12606,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12678,7 +12682,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12733,7 +12737,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12780,7 +12784,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12806,7 +12810,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12859,7 +12863,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12885,7 +12889,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12913,7 +12917,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -12986,7 +12990,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -13012,7 +13016,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13055,7 +13059,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13081,7 +13085,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13100,13 +13104,13 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13118,18 +13122,18 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13207,7 +13211,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13236,7 +13240,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13289,7 +13293,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13372,7 +13376,7 @@ }, { "name": "tableId", - "description": "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.", + "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": "", @@ -13452,7 +13456,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13559,7 +13563,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13651,7 +13655,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13678,7 +13682,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13737,7 +13741,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13766,7 +13770,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13827,7 +13831,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13948,7 +13952,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14045,7 +14049,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14074,7 +14078,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -14123,7 +14127,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14148,7 +14152,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "", @@ -14211,7 +14215,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14317,7 +14321,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14392,7 +14396,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -14410,18 +14414,18 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "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": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -14455,14 +14459,18 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "", @@ -14474,7 +14482,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "consumes": [], "produces": [ "application\/json" @@ -14492,13 +14500,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 215735cdb9..b0a58b264d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -9031,7 +9031,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9112,7 +9112,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9218,7 +9218,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9286,7 +9286,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9388,7 +9388,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9456,7 +9456,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9538,7 +9538,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9565,7 +9565,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -9645,7 +9645,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9672,7 +9672,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -9754,7 +9754,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9861,7 +9861,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9970,7 +9970,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10077,7 +10077,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10186,7 +10186,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10303,7 +10303,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10422,7 +10422,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10541,7 +10541,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10662,7 +10662,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10781,7 +10781,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10902,7 +10902,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11009,7 +11009,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11118,7 +11118,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11174,7 +11174,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11205,7 +11205,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11252,7 +11252,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11279,7 +11279,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -11372,7 +11372,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11399,7 +11399,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -11487,7 +11487,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11594,7 +11594,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11732,7 +11732,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11802,7 +11802,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11879,7 +11879,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11935,7 +11935,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -11982,7 +11982,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12009,7 +12009,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12062,7 +12062,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12089,7 +12089,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12117,7 +12117,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -12190,7 +12190,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12217,7 +12217,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12260,7 +12260,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12287,7 +12287,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12335,7 +12335,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12366,7 +12366,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12419,7 +12419,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12504,7 +12504,7 @@ }, { "name": "tableId", - "description": "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.", + "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": "", @@ -12584,7 +12584,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12692,7 +12692,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12785,7 +12785,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12813,7 +12813,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12872,7 +12872,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12903,7 +12903,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -12964,7 +12964,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13087,7 +13087,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13186,7 +13186,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13217,7 +13217,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "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": "", @@ -13268,7 +13268,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13375,7 +13375,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 960bc1d65e..9a905c83b1 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -635,7 +635,7 @@ return [ 'type' => 'url' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write'] + 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write'] ], [ 'icon' => 'icon-algolia', @@ -717,7 +717,7 @@ return [ 'type' => 'password' ], ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-meilisearch', @@ -811,7 +811,7 @@ return [ 'type' => 'text' ], ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-vonage', @@ -1139,7 +1139,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write'] + 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write'] ], [ 'icon' => 'icon-chat', @@ -1268,7 +1268,7 @@ return [ 'type' => 'password' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read'] + 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'tables.read', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write', 'buckets.read', 'buckets.write', 'files.read'] ], [ 'icon' => 'icon-eye', @@ -1327,7 +1327,7 @@ return [ 'type' => 'password' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read'] + 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'tables.read', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write', 'buckets.read', 'buckets.write', 'files.read'] ], [ 'icon' => 'icon-text', @@ -1386,7 +1386,7 @@ return [ 'type' => 'password' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read'] + 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'tables.read', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write', 'buckets.read', 'buckets.write', 'files.read'] ], [ 'icon' => 'icon-chat', @@ -1669,7 +1669,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-chip', @@ -1733,7 +1733,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-chat', diff --git a/composer.lock b/composer.lock index ff6884de7d..d5c2380af9 100644 --- a/composer.lock +++ b/composer.lock @@ -1113,16 +1113,16 @@ }, { "name": "open-telemetry/api", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86" + "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/4e3bb38e069876fb73c2ce85c89583bf2b28cd86", - "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", + "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", "shasum": "" }, "require": { @@ -1142,7 +1142,7 @@ ] }, "branch-alias": { - "dev-main": "1.1.x-dev" + "dev-main": "1.4.x-dev" } }, "autoload": { @@ -1179,7 +1179,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-07T12:32:21+00:00" + "time": "2025-06-19T23:36:51+00:00" }, { "name": "open-telemetry/context", @@ -1242,16 +1242,16 @@ }, { "name": "open-telemetry/exporter-otlp", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/exporter-otlp.git", - "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e" + "reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/8b3ca1f86d01429c73b407bf1a2075d9c187001e", - "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e", + "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/196f3a1dbce3b2c0f8110d164232c11ac00ddbb2", + "reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2", "shasum": "" }, "require": { @@ -1302,7 +1302,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-21T12:02:20+00:00" + "time": "2025-06-16T00:24:51+00:00" }, { "name": "open-telemetry/gen-otlp-protobuf", @@ -1369,22 +1369,22 @@ }, { "name": "open-telemetry/sdk", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657" + "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/cd0d7367599717fc29e04eb8838ec061e6c2c657", - "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", + "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", "shasum": "" }, "require": { "ext-json": "*", "nyholm/psr7-server": "^1.1", - "open-telemetry/api": "~1.0 || ~1.1", + "open-telemetry/api": "~1.4.0", "open-telemetry/context": "^1.0", "open-telemetry/sem-conv": "^1.0", "php": "^8.1", @@ -1407,6 +1407,10 @@ "type": "library", "extra": { "spi": { + "OpenTelemetry\\API\\Configuration\\ConfigEnv\\EnvComponentLoader": [ + "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderHttpConfig", + "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderPeerConfig" + ], "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" ] @@ -1455,7 +1459,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-22T02:33:34+00:00" + "time": "2025-06-19T23:36:51+00:00" }, { "name": "open-telemetry/sem-conv", @@ -1874,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.44", + "version": "3.0.45", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9" + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1d0b5e7e1434678411787c5a0535e68907cf82d9", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", "shasum": "" }, "require": { @@ -1964,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.44" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" }, "funding": [ { @@ -1980,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-15T09:59:26+00:00" + "time": "2025-06-22T22:54:43+00:00" }, { "name": "psr/container", @@ -3490,16 +3494,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.6", + "version": "0.71.7", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c" + "reference": "aa0116b2380125907fc18c82662be8e74c54091f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/2bd87acc40af087fc0fdcccc47c43141dff0be5c", - "reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c", + "url": "https://api.github.com/repos/utopia-php/database/zipball/aa0116b2380125907fc18c82662be8e74c54091f", + "reference": "aa0116b2380125907fc18c82662be8e74c54091f", "shasum": "" }, "require": { @@ -3540,9 +3544,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.6" + "source": "https://github.com/utopia-php/database/tree/0.71.7" }, - "time": "2025-06-16T16:48:37+00:00" + "time": "2025-06-17T23:59:10+00:00" }, { "name": "utopia-php/detector", @@ -4807,16 +4811,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.7", + "version": "0.41.8", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b" + "reference": "93ffb24b25b376ca4423e3a5caf6f916673af4b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b", - "reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/93ffb24b25b376ca4423e3a5caf6f916673af4b2", + "reference": "93ffb24b25b376ca4423e3a5caf6f916673af4b2", "shasum": "" }, "require": { @@ -4852,9 +4856,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.7" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.8" }, - "time": "2025-06-13T17:05:57+00:00" + "time": "2025-06-18T13:20:45+00:00" }, { "name": "doctrine/annotations", @@ -5147,16 +5151,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.74", + "version": "1.3.75", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4" + "reference": "76ba4a5f555fd7bf4aa408af608e991569076671" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a2593286a4135d03c6a6a9e9aeded5d41e931ce4", - "reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/76ba4a5f555fd7bf4aa408af608e991569076671", + "reference": "76ba4a5f555fd7bf4aa408af608e991569076671", "shasum": "" }, "require": { @@ -5205,7 +5209,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.74" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.75" }, "funding": [ { @@ -5213,7 +5217,7 @@ "type": "github" } ], - "time": "2025-06-12T08:06:04+00:00" + "time": "2025-06-25T09:56:19+00:00" }, { "name": "matthiasmullie/path-converter", 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/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-table-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md similarity index 66% rename from docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md rename to docs/examples/1.8.x/console-cli/examples/tables/get-usage.md index 15bd1167cc..ca955ce6df 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md @@ -1,4 +1,4 @@ -appwrite databases listTableLogs \ +appwrite tables getUsage \ --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-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-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md index b02b0687b2..a0dd3ce983 100644 --- 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 @@ -7,7 +7,6 @@ const client = new Client() const databases = new Databases(client); const result = await databases.getUsage( - '', // databaseId DatabaseUsageRange.TwentyFourHours // range (optional) ); 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/tables/create-index.md b/docs/examples/1.8.x/console-web/examples/tables/create-index.md index b24575b6c5..c303dd289d 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Tables, } from "@appwrite.io/console"; +import { Client, Tables, IndexType } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await tables.createIndex( '', // databaseId '', // tableId '', // key - .Key, // type + IndexType.Key, // type [], // columns [], // orders (optional) [] // lengths (optional) 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 index e6a27d6747..5658eec690 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Tables, , } from "@appwrite.io/console"; +import { Client, Tables, RelationshipType, RelationMutate } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,11 +10,11 @@ const result = await tables.createRelationshipColumn( '', // databaseId '', // tableId '', // relatedTableId - .OneToOne, // type + RelationshipType.OneToOne, // type false, // twoWay (optional) '', // key (optional) '', // twoWayKey (optional) - .Cascade // onDelete (optional) + RelationMutate.Cascade // onDelete (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://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getUsage( + '', // databaseId + '', // tableId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md similarity index 66% rename from docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md rename to docs/examples/1.8.x/console-web/examples/tables/list-logs.md index 1681fc917c..04d6c2300c 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md +++ b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md @@ -1,12 +1,12 @@ -import { Client, Databases } from "@appwrite.io/console"; +import { Client, Tables } 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 tables = new Tables(client); -const result = await databases.listTableLogs( +const result = await tables.listLogs( '', // databaseId '', // tableId [] // queries (optional) 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 index 1847e3459e..192eac7175 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Tables, } from "@appwrite.io/console"; +import { Client, Tables, RelationMutate } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await tables.updateRelationshipColumn( '', // databaseId '', // tableId '', // key - .Cascade, // onDelete (optional) + RelationMutate.Cascade, // onDelete (optional) '' // newKey (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 index 63417fd3be..d76c46959f 100644 --- 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 @@ -11,7 +11,7 @@ ColumnIndex result = await tables.createIndex( databaseId: '', tableId: '', key: '', - type: .key, + type: IndexType.key, columns: [], orders: [], // (optional) lengths: [], // (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 index 30a7f12342..a059740bf8 100644 --- 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 @@ -11,9 +11,9 @@ ColumnRelationship result = await tables.createRelationshipColumn( databaseId: '', tableId: '', relatedTableId: '', - type: .oneToOne, + type: RelationshipType.oneToOne, twoWay: false, // (optional) key: '', // (optional) twoWayKey: '', // (optional) - onDelete: .cascade, // (optional) + onDelete: RelationMutate.cascade, // (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 index ea6799ed46..45745627ef 100644 --- 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 @@ -11,6 +11,6 @@ ColumnRelationship result = await tables.updateRelationshipColumn( databaseId: '', tableId: '', key: '', - onDelete: .cascade, // (optional) + onDelete: RelationMutate.cascade, // (optional) newKey: '', // (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 index e3a330e4c7..c255189881 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Tables, } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Tables, IndexType } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const response = await tables.createIndex( '', // databaseId '', // tableId '', // key - .Key, // type + IndexType.Key, // type [], // columns [], // orders (optional) [] // lengths (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 index 8e2c5e6173..8c7e26e62c 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Tables, , } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Tables, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,9 +11,9 @@ const response = await tables.createRelationshipColumn( '', // databaseId '', // tableId '', // relatedTableId - .OneToOne, // type + RelationshipType.OneToOne, // type false, // twoWay (optional) '', // key (optional) '', // twoWayKey (optional) - .Cascade // onDelete (optional) + RelationMutate.Cascade // onDelete (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 index 99609c333e..c83b82037a 100644 --- 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 @@ -1,4 +1,4 @@ -import { Client, Tables, } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Tables, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +11,6 @@ const response = await tables.updateRelationshipColumn( '', // databaseId '', // tableId '', // key - .Cascade, // onDelete (optional) + RelationMutate.Cascade, // onDelete (optional) '' // newKey (optional) ); 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 index e9480e1d29..4ea3817da2 100644 --- 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 @@ -14,7 +14,7 @@ ColumnIndex result = await tables.CreateIndex( databaseId: "", tableId: "", key: "", - type: .Key, + type: IndexType.Key, columns: new List(), orders: new List(), // optional lengths: new List() // optional 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 index 54eb396748..7c4cba49dd 100644 --- 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 @@ -14,9 +14,9 @@ ColumnRelationship result = await tables.CreateRelationshipColumn( databaseId: "", tableId: "", relatedTableId: "", - type: .OneToOne, + type: RelationshipType.OneToOne, twoWay: false, // optional key: "", // optional twoWayKey: "", // optional - onDelete: .Cascade // optional + onDelete: RelationMutate.Cascade // 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 index 3437bb2fa9..be6aa31f73 100644 --- 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 @@ -14,6 +14,6 @@ ColumnRelationship result = await tables.UpdateRelationshipColumn( databaseId: "", tableId: "", key: "", - onDelete: .Cascade, // optional + onDelete: RelationMutate.Cascade, // optional newKey: "" // optional ); \ No newline at end of file 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 index 3044529f03..2a4df003c0 100644 --- 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 @@ -1,7 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Tables; -import io.appwrite.enums.Type; +import io.appwrite.enums.IndexType; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +14,7 @@ tables.createIndex( "", // databaseId "", // tableId "", // key - .KEY, // type + IndexType.KEY, // type listOf(), // columns listOf(), // orders (optional) listOf(), // lengths (optional) 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 index ea23817aae..7a0b50a541 100644 --- 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 @@ -1,7 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Tables; -import io.appwrite.enums.Type; +import io.appwrite.enums.RelationshipType; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,11 +14,11 @@ tables.createRelationshipColumn( "", // databaseId "", // tableId "", // relatedTableId - .ONETOONE, // type + RelationshipType.ONETOONE, // type false, // twoWay (optional) "", // key (optional) "", // twoWayKey (optional) - .CASCADE, // onDelete (optional) + RelationMutate.CASCADE, // onDelete (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); 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 index 06c27cc60b..e0dc185e0e 100644 --- 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 @@ -13,7 +13,7 @@ tables.updateRelationshipColumn( "", // databaseId "", // tableId "", // key - .CASCADE, // onDelete (optional) + RelationMutate.CASCADE, // onDelete (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { 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 index 7ea1668841..053c88a93a 100644 --- 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 @@ -1,7 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Tables -import io.appwrite.enums.Type +import io.appwrite.enums.IndexType val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +14,7 @@ val response = tables.createIndex( databaseId = "", tableId = "", key = "", - type = .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-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md index ae3c87ee39..aa07fac6a8 100644 --- 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 @@ -1,7 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Tables -import io.appwrite.enums.Type +import io.appwrite.enums.RelationshipType val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +14,7 @@ val response = tables.createRelationshipColumn( databaseId = "", tableId = "", relatedTableId = "", - type = .ONETOONE, + type = RelationshipType.ONETOONE, twoWay = false, // optional key = "", // optional twoWayKey = "", // 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 index 886a8c3935..aef047ba5f 100644 --- 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 @@ -11,7 +11,7 @@ const result = await tables.createIndex( '', // databaseId '', // tableId '', // key - sdk..Key, // type + sdk.IndexType.Key, // type [], // columns [], // orders (optional) [] // lengths (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 index 213b6d6923..b6e7fa517f 100644 --- 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 @@ -11,9 +11,9 @@ const result = await tables.createRelationshipColumn( '', // databaseId '', // tableId '', // relatedTableId - sdk..OneToOne, // type + sdk.RelationshipType.OneToOne, // type false, // twoWay (optional) '', // key (optional) '', // twoWayKey (optional) - sdk..Cascade // onDelete (optional) + sdk.RelationMutate.Cascade // onDelete (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 index c30163f2c8..3409b8caad 100644 --- 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 @@ -11,6 +11,6 @@ const result = await tables.updateRelationshipColumn( '', // databaseId '', // tableId '', // key - sdk..Cascade, // onDelete (optional) + sdk.RelationMutate.Cascade, // onDelete (optional) '' // newKey (optional) ); 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 index c21a162359..9844e041d4 100644 --- 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 @@ -2,7 +2,7 @@ use Appwrite\Client; use Appwrite\Services\Tables; -use Appwrite\Enums\; +use Appwrite\Enums\IndexType; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,7 +15,7 @@ $result = $tables->createIndex( databaseId: '', tableId: '', key: '', - type: ::KEY(), + type: IndexType::KEY(), columns: [], orders: [], // optional lengths: [] // optional 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 index 9597dffdfe..c86b4c558a 100644 --- 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 @@ -2,7 +2,7 @@ use Appwrite\Client; use Appwrite\Services\Tables; -use Appwrite\Enums\; +use Appwrite\Enums\RelationshipType; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,9 +15,9 @@ $result = $tables->createRelationshipColumn( databaseId: '', tableId: '', relatedTableId: '', - type: ::ONETOONE(), + type: RelationshipType::ONETOONE(), twoWay: false, // optional key: '', // optional twoWayKey: '', // optional - onDelete: ::CASCADE() // optional + onDelete: RelationMutate::CASCADE() // 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 index b29f8c86a8..d6505c77f1 100644 --- 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 @@ -14,6 +14,6 @@ $result = $tables->updateRelationshipColumn( databaseId: '', tableId: '', key: '', - onDelete: ::CASCADE(), // optional + onDelete: RelationMutate::CASCADE(), // optional newKey: '' // optional ); \ No newline at end of file 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 index 4015affc61..69086af0b0 100644 --- 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 @@ -1,6 +1,6 @@ from appwrite.client import Client from appwrite.services.tables import Tables -from appwrite.enums import +from appwrite.enums import IndexType client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,7 +13,7 @@ result = tables.create_index( database_id = '', table_id = '', key = '', - type = .KEY, + type = IndexType.KEY, columns = [], orders = [], # optional lengths = [] # 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 index 9f20be2203..187271f887 100644 --- 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 @@ -1,6 +1,6 @@ from appwrite.client import Client from appwrite.services.tables import Tables -from appwrite.enums import +from appwrite.enums import RelationshipType client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,9 +13,9 @@ result = tables.create_relationship_column( database_id = '', table_id = '', related_table_id = '', - type = .ONETOONE, + type = RelationshipType.ONETOONE, two_way = False, # optional key = '', # optional two_way_key = '', # optional - on_delete = .CASCADE # optional + on_delete = RelationMutate.CASCADE # 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 index b237e67647..35a307c7e2 100644 --- 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 @@ -12,6 +12,6 @@ result = tables.update_relationship_column( database_id = '', table_id = '', key = '', - on_delete = .CASCADE, # optional + on_delete = RelationMutate.CASCADE, # optional new_key = '' # 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 index 1ec5d315dc..3c8dfdfb6b 100644 --- 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 @@ -14,7 +14,7 @@ result = tables.create_index( database_id: '', table_id: '', key: '', - type: ::KEY, + type: IndexType::KEY, columns: [], orders: [], # optional lengths: [] # 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 index 65f4a15966..8f7fb841aa 100644 --- 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 @@ -14,9 +14,9 @@ result = tables.create_relationship_column( database_id: '', table_id: '', related_table_id: '', - type: ::ONETOONE, + type: RelationshipType::ONETOONE, two_way: false, # optional key: '', # optional two_way_key: '', # optional - on_delete: ::CASCADE # optional + on_delete: RelationMutate::CASCADE # 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 index 9d82801fe8..de86fd53d7 100644 --- 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 @@ -13,6 +13,6 @@ result = tables.update_relationship_column( database_id: '', table_id: '', key: '', - on_delete: ::CASCADE, # optional + on_delete: RelationMutate::CASCADE, # optional new_key: '' # optional ) 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/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/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 b6417e929a..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 @@ -32,7 +32,7 @@ class Create extends BooleanCreate ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') @@ -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 534e514bdf..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 @@ -33,7 +33,7 @@ class Update extends BooleanUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') @@ -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 d29d8fd8b2..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 @@ -33,7 +33,7 @@ class Create extends DatetimeCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 f343b5f41d..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 @@ -35,7 +35,7 @@ class Update extends DatetimeUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') 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 97f5443bc8..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 @@ -32,7 +32,7 @@ class Delete extends AttributesDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.delete') 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 3052e63149..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 @@ -32,7 +32,7 @@ class Create extends EmailCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 82895f6cf1..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 @@ -34,7 +34,7 @@ class Update extends EmailUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') 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 25414fa91d..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 @@ -34,7 +34,7 @@ class Create extends EnumCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 6bc8df63e4..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 @@ -36,7 +36,7 @@ class Update extends EnumUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') 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 c7e102699e..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 @@ -32,7 +32,7 @@ class Create extends FloatCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 ec2467cf96..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 @@ -34,7 +34,7 @@ class Update extends FloatUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') 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 2409468e56..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 @@ -41,7 +41,7 @@ class Get extends AttributesGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') ->desc('Get column') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), 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 48ebd3c300..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 @@ -32,7 +32,7 @@ class Create extends IPCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 83609fbf6f..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 @@ -34,7 +34,7 @@ class Update extends IPUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') 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 b7f50d3ca4..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 @@ -32,7 +32,7 @@ class Create extends IntegerCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 ef92d242e5..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 @@ -34,7 +34,7 @@ class Update extends IntegerUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') 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 bdbf136bfc..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 @@ -33,7 +33,7 @@ class Create extends RelationshipCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 98a5db3758..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 @@ -33,7 +33,7 @@ class Update extends RelationshipUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') 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 c61b3e465a..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 @@ -34,7 +34,7 @@ class Create extends StringCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') @@ -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 b8c52d15cb..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 @@ -36,7 +36,7 @@ class Update extends StringUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') @@ -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 6fdf0f6e2b..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 @@ -32,7 +32,7 @@ class Create extends URLCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') 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 79207338b4..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 @@ -34,7 +34,7 @@ class Update extends URLUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index 8190f2ec71..b6578777b0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -30,7 +30,7 @@ class XList extends AttributesXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns') ->desc('List columns') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), 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 ed31333dac..1fee8fc840 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -35,7 +35,7 @@ class Create extends CollectionCreate ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'table.create') ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') 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 3e30013176..ef0478c042 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -30,7 +30,7 @@ class Delete extends CollectionDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].delete') ->label('audits.event', 'table.delete') 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 30d3f95477..1cc147f04d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -30,7 +30,7 @@ class Get extends CollectionGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') ->desc('Get table') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), 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 b11892e0f9..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 @@ -37,7 +37,7 @@ class Create extends IndexCreate ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') @@ -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 4ff9638f27..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 @@ -16,7 +16,7 @@ class Delete extends IndexDelete { public static function getName(): string { - return 'updateColumnIndex'; + return 'deleteColumnIndex'; } /** @@ -35,7 +35,7 @@ class Delete extends IndexDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') ->label('audits.event', 'index.delete') @@ -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 79529fda66..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 @@ -31,7 +31,7 @@ class Get extends IndexGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), @@ -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 12581a4fc3..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 @@ -31,7 +31,7 @@ class XList extends IndexXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), @@ -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 f879e01abb..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 @@ -27,12 +27,12 @@ class XList extends CollectionLogXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: self::getName(), + name: 'listLogs', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/databases/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ 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 d854bebe4c..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 @@ -32,7 +32,7 @@ class Delete extends DocumentsDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') @@ -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 6a678fd237..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 @@ -33,7 +33,7 @@ class Update extends DocumentsUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Update rows') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') 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 97e3769750..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 @@ -32,7 +32,7 @@ class Upsert extends DocumentsUpsert ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Create or update rows') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') 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 37d46cee97..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 @@ -33,7 +33,7 @@ class Decrement extends DecrementDocumentAttribute ->desc('Decrement row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].decrement') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.decrement') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') 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 e953824e58..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 @@ -33,7 +33,7 @@ class Increment extends IncrementDocumentAttribute ->desc('Increment row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].increment') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.increment') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') 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 c49cf2d4bc..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 @@ -41,7 +41,7 @@ class Create extends DocumentCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') @@ -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 56133814ee..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 @@ -36,7 +36,7 @@ class Delete extends DocumentDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') ->desc('Delete row') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') ->label('audits.event', 'row.delete') @@ -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 9fcb155105..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 @@ -32,7 +32,7 @@ class Get extends DocumentGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') ->desc('Get row') ->groups(['api', 'database']) - ->label('scope', 'documents.read') + ->label('scope', 'rows.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), @@ -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 51f0259431..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 @@ -27,7 +27,7 @@ class XList extends DocumentLogXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') ->desc('List row logs') ->groups(['api', 'database']) - ->label('scope', 'documents.read') + ->label('scope', 'rows.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), @@ -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 a3992143c3..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 @@ -34,7 +34,7 @@ class Update extends DocumentUpdate ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') 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 0b67d0b533..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 @@ -34,7 +34,7 @@ class Upsert extends DocumentUpsert ->desc('Create or update a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.upsert') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') 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 3ecbed1d6f..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 @@ -32,7 +32,7 @@ class XList extends DocumentXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('List rows') ->groups(['api', 'database']) - ->label('scope', 'documents.read') + ->label('scope', 'rows.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), @@ -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 c0e1b32f78..f5400366fd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -33,7 +33,7 @@ class Update extends CollectionUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].update') ->label('audits.event', 'table.update') 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 99146d1dd0..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 @@ -31,12 +31,12 @@ class Get extends CollectionUsageGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, - name: self::getName(), + 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: [ @@ -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 427e2a085a..361ab2020f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -32,7 +32,7 @@ class XList extends CollectionXList ->setHttpPath('/v1/databases/:databaseId/tables') ->desc('List tables') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), 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/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index b59308c288..66f45004ea 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -246,8 +246,11 @@ class Migrations extends Action 'functions.write', 'databases.read', 'collections.read', + 'tables.read', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'tokens.read', 'tokens.write', ] 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': diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index d2a0776f93..7b9ffcbaf8 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -423,6 +423,8 @@ class Swagger2 extends Format case 'Utopia\Database\Validator\Queries': case 'Utopia\Database\Validator\Queries\Document': case 'Utopia\Database\Validator\Queries\Documents': + case 'Appwrite\Utopia\Database\Validator\Queries\Columns': + case 'Appwrite\Utopia\Database\Validator\Queries\Tables': $node['type'] = 'array'; $node['collectionFormat'] = 'multi'; $node['items'] = [ diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 51aebeaef7..ea27318390 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -70,8 +70,12 @@ trait ProjectCustom 'databases.write', 'collections.read', 'collections.write', + 'tables.read', + 'tables.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'buckets.read', diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 8b34d552f5..5e22a28016 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -2991,7 +2991,7 @@ class ProjectsConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Key Test Update', - 'scopes' => ['users.read', 'users.write', 'collections.read'], + 'scopes' => ['users.read', 'users.write', 'collections.read', 'tables.read'], 'expire' => DateTime::addSeconds(new \DateTime(), 360), ]); @@ -3002,6 +3002,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('users.read', $response['body']['scopes']); $this->assertContains('users.write', $response['body']['scopes']); $this->assertContains('collections.read', $response['body']['scopes']); + $this->assertContains('tables.read', $response['body']['scopes']); $this->assertCount(3, $response['body']['scopes']); $this->assertArrayHasKey('sdks', $response['body']); $this->assertEmpty($response['body']['sdks']); @@ -3020,6 +3021,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('users.read', $response['body']['scopes']); $this->assertContains('users.write', $response['body']['scopes']); $this->assertContains('collections.read', $response['body']['scopes']); + $this->assertContains('tables.read', $response['body']['scopes']); $this->assertCount(3, $response['body']['scopes']); $this->assertArrayHasKey('sdks', $response['body']); $this->assertEmpty($response['body']['sdks']);