Merge pull request #10212 from appwrite/grids-api

Move to grids API
This commit is contained in:
Jake Barnby 2025-07-28 19:15:44 +12:00 committed by GitHub
commit 767f575984
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
141 changed files with 8150 additions and 4603 deletions

View file

@ -146,7 +146,7 @@ jobs:
Avatars,
Console,
Databases/Legacy,
Databases/Tables,
Databases/Grids,
Functions,
FunctionsSchedule,
GraphQL,
@ -216,7 +216,7 @@ jobs:
Avatars,
Console,
Databases/Legacy,
Databases/Tables,
Databases/Grids,
Functions,
FunctionsSchedule,
GraphQL,

View file

@ -1856,7 +1856,6 @@
"client"
],
"packaging": false,
"deprecated": true,
"auth": {
"Project": []
}
@ -2066,7 +2065,6 @@
"client"
],
"packaging": false,
"deprecated": true,
"auth": {
"Project": []
}
@ -4381,7 +4379,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.listRows"
"replaceWith": "grids.listRows"
},
"auth": {
"Project": []
@ -4470,15 +4468,14 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.createRow"
"replaceWith": "grids.createRow"
},
"methods": [
{
"name": "createDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -4499,7 +4496,11 @@
"model": "#\/components\/schemas\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.createRow"
}
}
],
"auth": {
@ -4615,7 +4616,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.getRow"
"replaceWith": "grids.getRow"
},
"auth": {
"Project": []
@ -4714,25 +4715,39 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.upsertRow"
"replaceWith": "grids.upsertRow"
},
"methods": [
{
"name": "upsertDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/components\/schemas\/document"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.upsertRow"
}
}
],
"auth": {
@ -4846,7 +4861,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.updateRow"
"replaceWith": "grids.updateRow"
},
"auth": {
"Project": []
@ -4949,7 +4964,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.deleteRow"
"replaceWith": "grids.deleteRow"
},
"auth": {
"Project": []
@ -4996,12 +5011,12 @@
]
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": {
"get": {
"summary": "List rows",
"operationId": "tablesListRows",
"operationId": "gridsListRows",
"tags": [
"tables"
"grids"
],
"description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.",
"responses": {
@ -5023,8 +5038,8 @@
"weight": 412,
"cookies": false,
"type": "",
"demo": "tables\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md",
"demo": "grids\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5084,9 +5099,9 @@
},
"post": {
"summary": "Create row",
"operationId": "tablesCreateRow",
"operationId": "gridsCreateRow",
"tags": [
"tables"
"grids"
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5108,8 +5123,8 @@
"weight": 404,
"cookies": false,
"type": "",
"demo": "tables\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md",
"demo": "grids\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5123,10 +5138,9 @@
"methods": [
{
"name": "createRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -5148,30 +5162,6 @@
}
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
},
{
"name": "createRows",
"auth": {
"Admin": [],
"Key": []
},
"parameters": [
"databaseId",
"tableId",
"rows"
],
"required": [
"databaseId",
"tableId",
"rows"
],
"responses": [
{
"code": 201,
"model": "#\/components\/schemas\/rowList"
}
],
"description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
}
],
"auth": {
@ -5246,12 +5236,12 @@
}
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": {
"get": {
"summary": "Get row",
"operationId": "tablesGetRow",
"operationId": "gridsGetRow",
"tags": [
"tables"
"grids"
],
"description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.",
"responses": {
@ -5273,8 +5263,8 @@
"weight": 405,
"cookies": false,
"type": "",
"demo": "tables\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md",
"demo": "grids\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5344,9 +5334,9 @@
},
"put": {
"summary": "Create or update a row",
"operationId": "tablesUpsertRow",
"operationId": "gridsUpsertRow",
"tags": [
"tables"
"grids"
],
"description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5368,8 +5358,8 @@
"weight": 408,
"cookies": false,
"type": "",
"demo": "tables\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md",
"demo": "grids\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5383,13 +5373,22 @@
"methods": [
{
"name": "upsertRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"tableId",
"rowId",
"data",
"permissions"
],
"required": [
"databaseId",
"tableId",
"rowId"
],
"responses": [
{
"code": 201,
@ -5469,9 +5468,9 @@
},
"patch": {
"summary": "Update row",
"operationId": "tablesUpdateRow",
"operationId": "gridsUpdateRow",
"tags": [
"tables"
"grids"
],
"description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.",
"responses": {
@ -5493,8 +5492,8 @@
"weight": 406,
"cookies": false,
"type": "",
"demo": "tables\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md",
"demo": "grids\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5575,9 +5574,9 @@
},
"delete": {
"summary": "Delete row",
"operationId": "tablesDeleteRow",
"operationId": "gridsDeleteRow",
"tags": [
"tables"
"grids"
],
"description": "Delete a row by its unique ID.",
"responses": {
@ -5592,8 +5591,8 @@
"weight": 410,
"cookies": false,
"type": "",
"demo": "tables\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md",
"demo": "grids\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md",
"rate-limit": 60,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5830,7 +5829,7 @@
"scheduledAt": {
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4379,7 +4379,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.listRows"
"replaceWith": "grids.listRows"
},
"auth": {
"Project": []
@ -4468,15 +4468,14 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.createRow"
"replaceWith": "grids.createRow"
},
"methods": [
{
"name": "createDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -4497,7 +4496,11 @@
"model": "#\/components\/schemas\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.createRow"
}
}
],
"auth": {
@ -4613,7 +4616,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.getRow"
"replaceWith": "grids.getRow"
},
"auth": {
"Project": []
@ -4712,25 +4715,39 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.upsertRow"
"replaceWith": "grids.upsertRow"
},
"methods": [
{
"name": "upsertDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/components\/schemas\/document"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.upsertRow"
}
}
],
"auth": {
@ -4844,7 +4861,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.updateRow"
"replaceWith": "grids.updateRow"
},
"auth": {
"Project": []
@ -4947,7 +4964,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.deleteRow"
"replaceWith": "grids.deleteRow"
},
"auth": {
"Project": []
@ -4994,12 +5011,12 @@
]
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": {
"get": {
"summary": "List rows",
"operationId": "tablesListRows",
"operationId": "gridsListRows",
"tags": [
"tables"
"grids"
],
"description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.",
"responses": {
@ -5021,8 +5038,8 @@
"weight": 412,
"cookies": false,
"type": "",
"demo": "tables\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md",
"demo": "grids\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5082,9 +5099,9 @@
},
"post": {
"summary": "Create row",
"operationId": "tablesCreateRow",
"operationId": "gridsCreateRow",
"tags": [
"tables"
"grids"
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5106,8 +5123,8 @@
"weight": 404,
"cookies": false,
"type": "",
"demo": "tables\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md",
"demo": "grids\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5121,10 +5138,9 @@
"methods": [
{
"name": "createRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -5146,30 +5162,6 @@
}
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
},
{
"name": "createRows",
"auth": {
"Admin": [],
"Key": []
},
"parameters": [
"databaseId",
"tableId",
"rows"
],
"required": [
"databaseId",
"tableId",
"rows"
],
"responses": [
{
"code": 201,
"model": "#\/components\/schemas\/rowList"
}
],
"description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
}
],
"auth": {
@ -5244,12 +5236,12 @@
}
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": {
"get": {
"summary": "Get row",
"operationId": "tablesGetRow",
"operationId": "gridsGetRow",
"tags": [
"tables"
"grids"
],
"description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.",
"responses": {
@ -5271,8 +5263,8 @@
"weight": 405,
"cookies": false,
"type": "",
"demo": "tables\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md",
"demo": "grids\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5342,9 +5334,9 @@
},
"put": {
"summary": "Create or update a row",
"operationId": "tablesUpsertRow",
"operationId": "gridsUpsertRow",
"tags": [
"tables"
"grids"
],
"description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5366,8 +5358,8 @@
"weight": 408,
"cookies": false,
"type": "",
"demo": "tables\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md",
"demo": "grids\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5381,13 +5373,22 @@
"methods": [
{
"name": "upsertRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"tableId",
"rowId",
"data",
"permissions"
],
"required": [
"databaseId",
"tableId",
"rowId"
],
"responses": [
{
"code": 201,
@ -5467,9 +5468,9 @@
},
"patch": {
"summary": "Update row",
"operationId": "tablesUpdateRow",
"operationId": "gridsUpdateRow",
"tags": [
"tables"
"grids"
],
"description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.",
"responses": {
@ -5491,8 +5492,8 @@
"weight": 406,
"cookies": false,
"type": "",
"demo": "tables\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md",
"demo": "grids\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5573,9 +5574,9 @@
},
"delete": {
"summary": "Delete row",
"operationId": "tablesDeleteRow",
"operationId": "gridsDeleteRow",
"tags": [
"tables"
"grids"
],
"description": "Delete a row by its unique ID.",
"responses": {
@ -5590,8 +5591,8 @@
"weight": 410,
"cookies": false,
"type": "",
"demo": "tables\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md",
"demo": "grids\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md",
"rate-limit": 60,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5828,7 +5829,7 @@
"scheduledAt": {
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1964,7 +1964,6 @@
"client"
],
"packaging": false,
"deprecated": true,
"auth": {
"Project": []
}
@ -2175,7 +2174,6 @@
"client"
],
"packaging": false,
"deprecated": true,
"auth": {
"Project": []
}
@ -4522,7 +4520,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.listRows"
"replaceWith": "grids.listRows"
},
"auth": {
"Project": []
@ -4607,15 +4605,14 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.createRow"
"replaceWith": "grids.createRow"
},
"methods": [
{
"name": "createDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -4636,7 +4633,11 @@
"model": "#\/definitions\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.createRow"
}
}
],
"auth": {
@ -4749,7 +4750,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.getRow"
"replaceWith": "grids.getRow"
},
"auth": {
"Project": []
@ -4842,25 +4843,39 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.upsertRow"
"replaceWith": "grids.upsertRow"
},
"methods": [
{
"name": "upsertDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/definitions\/document"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.upsertRow"
}
}
],
"auth": {
@ -4969,7 +4984,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.updateRow"
"replaceWith": "grids.updateRow"
},
"auth": {
"Project": []
@ -5069,7 +5084,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.deleteRow"
"replaceWith": "grids.deleteRow"
},
"auth": {
"Project": []
@ -5110,16 +5125,16 @@
]
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": {
"get": {
"summary": "List rows",
"operationId": "tablesListRows",
"operationId": "gridsListRows",
"consumes": [],
"produces": [
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.",
"responses": {
@ -5137,8 +5152,8 @@
"weight": 412,
"cookies": false,
"type": "",
"demo": "tables\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md",
"demo": "grids\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5192,7 +5207,7 @@
},
"post": {
"summary": "Create row",
"operationId": "tablesCreateRow",
"operationId": "gridsCreateRow",
"consumes": [
"application\/json"
],
@ -5200,7 +5215,7 @@
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5218,8 +5233,8 @@
"weight": 404,
"cookies": false,
"type": "",
"demo": "tables\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md",
"demo": "grids\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5232,10 +5247,9 @@
"methods": [
{
"name": "createRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -5257,30 +5271,6 @@
}
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
},
{
"name": "createRows",
"auth": {
"Admin": [],
"Key": []
},
"parameters": [
"databaseId",
"tableId",
"rows"
],
"required": [
"databaseId",
"tableId",
"rows"
],
"responses": [
{
"code": 201,
"model": "#\/definitions\/rowList"
}
],
"description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
}
],
"auth": {
@ -5353,16 +5343,16 @@
]
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": {
"get": {
"summary": "Get row",
"operationId": "tablesGetRow",
"operationId": "gridsGetRow",
"consumes": [],
"produces": [
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.",
"responses": {
@ -5380,8 +5370,8 @@
"weight": 405,
"cookies": false,
"type": "",
"demo": "tables\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md",
"demo": "grids\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5443,7 +5433,7 @@
},
"put": {
"summary": "Create or update a row",
"operationId": "tablesUpsertRow",
"operationId": "gridsUpsertRow",
"consumes": [
"application\/json"
],
@ -5451,7 +5441,7 @@
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5469,8 +5459,8 @@
"weight": 408,
"cookies": false,
"type": "",
"demo": "tables\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md",
"demo": "grids\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5483,13 +5473,22 @@
"methods": [
{
"name": "upsertRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"tableId",
"rowId",
"data",
"permissions"
],
"required": [
"databaseId",
"tableId",
"rowId"
],
"responses": [
{
"code": 201,
@ -5563,7 +5562,7 @@
},
"patch": {
"summary": "Update row",
"operationId": "tablesUpdateRow",
"operationId": "gridsUpdateRow",
"consumes": [
"application\/json"
],
@ -5571,7 +5570,7 @@
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.",
"responses": {
@ -5589,8 +5588,8 @@
"weight": 406,
"cookies": false,
"type": "",
"demo": "tables\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md",
"demo": "grids\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5664,13 +5663,13 @@
},
"delete": {
"summary": "Delete row",
"operationId": "tablesDeleteRow",
"operationId": "gridsDeleteRow",
"consumes": [
"application\/json"
],
"produces": [],
"tags": [
"tables"
"grids"
],
"description": "Delete a row by its unique ID.",
"responses": {
@ -5685,8 +5684,8 @@
"weight": 410,
"cookies": false,
"type": "",
"demo": "tables\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md",
"demo": "grids\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md",
"rate-limit": 60,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5916,7 +5915,7 @@
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"default": null,
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4520,7 +4520,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.listRows"
"replaceWith": "grids.listRows"
},
"auth": {
"Project": []
@ -4605,15 +4605,14 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.createRow"
"replaceWith": "grids.createRow"
},
"methods": [
{
"name": "createDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -4634,7 +4633,11 @@
"model": "#\/definitions\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.createRow"
}
}
],
"auth": {
@ -4747,7 +4750,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.getRow"
"replaceWith": "grids.getRow"
},
"auth": {
"Project": []
@ -4840,25 +4843,39 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.upsertRow"
"replaceWith": "grids.upsertRow"
},
"methods": [
{
"name": "upsertDocument",
"namespace": "databases",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/definitions\/document"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"deprecated": {
"since": "1.8.0",
"replaceWith": "grids.upsertRow"
}
}
],
"auth": {
@ -4967,7 +4984,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.updateRow"
"replaceWith": "grids.updateRow"
},
"auth": {
"Project": []
@ -5067,7 +5084,7 @@
"packaging": false,
"deprecated": {
"since": "1.8.0",
"replaceWith": "tables.deleteRow"
"replaceWith": "grids.deleteRow"
},
"auth": {
"Project": []
@ -5108,16 +5125,16 @@
]
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": {
"get": {
"summary": "List rows",
"operationId": "tablesListRows",
"operationId": "gridsListRows",
"consumes": [],
"produces": [
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.",
"responses": {
@ -5135,8 +5152,8 @@
"weight": 412,
"cookies": false,
"type": "",
"demo": "tables\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md",
"demo": "grids\/list-rows.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5190,7 +5207,7 @@
},
"post": {
"summary": "Create row",
"operationId": "tablesCreateRow",
"operationId": "gridsCreateRow",
"consumes": [
"application\/json"
],
@ -5198,7 +5215,7 @@
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5216,8 +5233,8 @@
"weight": 404,
"cookies": false,
"type": "",
"demo": "tables\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md",
"demo": "grids\/create-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5230,10 +5247,9 @@
"methods": [
{
"name": "createRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [
"databaseId",
@ -5255,30 +5271,6 @@
}
],
"description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
},
{
"name": "createRows",
"auth": {
"Admin": [],
"Key": []
},
"parameters": [
"databaseId",
"tableId",
"rows"
],
"required": [
"databaseId",
"tableId",
"rows"
],
"responses": [
{
"code": 201,
"model": "#\/definitions\/rowList"
}
],
"description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console."
}
],
"auth": {
@ -5351,16 +5343,16 @@
]
}
},
"\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": {
"\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": {
"get": {
"summary": "Get row",
"operationId": "tablesGetRow",
"operationId": "gridsGetRow",
"consumes": [],
"produces": [
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.",
"responses": {
@ -5378,8 +5370,8 @@
"weight": 405,
"cookies": false,
"type": "",
"demo": "tables\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md",
"demo": "grids\/get-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@ -5441,7 +5433,7 @@
},
"put": {
"summary": "Create or update a row",
"operationId": "tablesUpsertRow",
"operationId": "gridsUpsertRow",
"consumes": [
"application\/json"
],
@ -5449,7 +5441,7 @@
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.",
"responses": {
@ -5467,8 +5459,8 @@
"weight": 408,
"cookies": false,
"type": "",
"demo": "tables\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md",
"demo": "grids\/upsert-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5481,13 +5473,22 @@
"methods": [
{
"name": "upsertRow",
"namespace": "grids",
"auth": {
"Session": [],
"Key": [],
"JWT": []
"Project": []
},
"parameters": [],
"required": [],
"parameters": [
"databaseId",
"tableId",
"rowId",
"data",
"permissions"
],
"required": [
"databaseId",
"tableId",
"rowId"
],
"responses": [
{
"code": 201,
@ -5561,7 +5562,7 @@
},
"patch": {
"summary": "Update row",
"operationId": "tablesUpdateRow",
"operationId": "gridsUpdateRow",
"consumes": [
"application\/json"
],
@ -5569,7 +5570,7 @@
"application\/json"
],
"tags": [
"tables"
"grids"
],
"description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.",
"responses": {
@ -5587,8 +5588,8 @@
"weight": 406,
"cookies": false,
"type": "",
"demo": "tables\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md",
"demo": "grids\/update-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md",
"rate-limit": 120,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5662,13 +5663,13 @@
},
"delete": {
"summary": "Delete row",
"operationId": "tablesDeleteRow",
"operationId": "gridsDeleteRow",
"consumes": [
"application\/json"
],
"produces": [],
"tags": [
"tables"
"grids"
],
"description": "Delete a row by its unique ID.",
"responses": {
@ -5683,8 +5684,8 @@
"weight": 410,
"cookies": false,
"type": "",
"demo": "tables\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md",
"demo": "grids\/delete-row.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md",
"rate-limit": 60,
"rate-time": 60,
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
@ -5914,7 +5915,7 @@
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"default": null,
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -86,7 +86,7 @@
},
"require-dev": {
"ext-fileinfo": "*",
"appwrite/sdk-generator": "0.41.*",
"appwrite/sdk-generator": "0.*.*",
"phpunit/phpunit": "9.*",
"swoole/ide-helper": "5.1.2",
"phpstan/phpstan": "1.8.*",

2
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ee81ef96c463854d58fd5678c28ad896",
"content-hash": "f4876940be4499bea26a77a036dece4f",
"packages": [
{
"name": "adhocore/jwt",

View file

@ -20,7 +20,7 @@ abstract class Action extends UtopiaAction
public function setHttpPath(string $path): UtopiaAction
{
if (str_contains($path, '/:databaseId/tables')) {
if (str_contains($path, '/:databaseId/grids/tables')) {
$this->context = TABLES;
}
@ -64,7 +64,7 @@ abstract class Action extends UtopiaAction
*/
final protected function getSdkNamespace(): string
{
return $this->isCollectionsAPI() ? 'databases' : 'tables';
return $this->isCollectionsAPI() ? 'databases' : 'grids';
}
/**

View file

@ -37,7 +37,7 @@ abstract class Action extends UtopiaAction
public function setHttpPath(string $path): UtopiaAction
{
if (str_contains($path, '/:databaseId/tables')) {
if (str_contains($path, '/:databaseId/grids/tables')) {
$this->context = COLUMNS;
}
@ -77,7 +77,7 @@ abstract class Action extends UtopiaAction
*/
final protected function getSdkNamespace(): string
{
return $this->isCollectionsAPI() ? 'databases' : 'tables';
return $this->isCollectionsAPI() ? 'databases' : 'grids';
}
/**

View file

@ -55,7 +55,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createBooleanColumn',
replaceWith: 'grids.createBooleanColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -56,7 +56,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateBooleanColumn',
replaceWith: 'grids.updateBooleanColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -56,7 +56,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createDatetimeColumn',
replaceWith: 'grids.createDatetimeColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateDatetimeColumn',
replaceWith: 'grids.updateDatetimeColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class Delete extends Action
contentType: ContentType::NONE,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.deleteColumn',
replaceWith: 'grids.deleteColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -56,7 +56,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createEmailColumn',
replaceWith: 'grids.createEmailColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateEmailColumn',
replaceWith: 'grids.updateEmailColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -58,7 +58,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createEnumColumn',
replaceWith: 'grids.createEnumColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -58,7 +58,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateEnumColumn',
replaceWith: 'grids.updateEnumColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -58,7 +58,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createFloatColumn',
replaceWith: 'grids.createFloatColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateFloatColumn',
replaceWith: 'grids.updateFloatColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -60,7 +60,7 @@ class Get extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.getColumn',
replaceWith: 'grids.getColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -56,7 +56,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createIpColumn',
replaceWith: 'grids.createIpColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateIpColumn',
replaceWith: 'grids.updateIpColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -58,7 +58,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createIntegerColumn',
replaceWith: 'grids.createIntegerColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateIntegerColumn',
replaceWith: 'grids.updateIntegerColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -58,7 +58,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createRelationshipColumn',
replaceWith: 'grids.createRelationshipColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -55,7 +55,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateRelationshipColumn',
replaceWith: 'grids.updateRelationshipColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -60,7 +60,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createStringColumn',
replaceWith: 'grids.createStringColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -59,7 +59,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateStringColumn',
replaceWith: 'grids.updateStringColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -56,7 +56,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createUrlColumn',
replaceWith: 'grids.createUrlColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateUrlColumn',
replaceWith: 'grids.updateUrlColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -54,7 +54,7 @@ class XList extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.listColumns',
replaceWith: 'grids.listColumns',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -65,7 +65,7 @@ class Create extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.create',
replaceWith: 'grids.createTable',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -55,7 +55,7 @@ class Delete extends Action
contentType: ContentType::NONE,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.delete',
replaceWith: 'grids.deleteTable',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -22,7 +22,7 @@ abstract class Action extends UtopiaAction
public function setHttpPath(string $path): UtopiaAction
{
if (str_contains($path, '/:databaseId/tables')) {
if (str_contains($path, '/:databaseId/grids/tables')) {
$this->context = ROWS;
}
@ -72,7 +72,7 @@ abstract class Action extends UtopiaAction
*/
final protected function getSdkNamespace(): string
{
return $this->isCollectionsAPI() ? 'databases' : 'tables';
return $this->isCollectionsAPI() ? 'databases' : 'grids';
}
/**

View file

@ -65,7 +65,7 @@ class Decrement extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.decrementRowColumn',
replaceWith: 'grids.decrementRowColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -65,7 +65,7 @@ class Increment extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.incrementRowColumn',
replaceWith: 'grids.incrementRowColumn',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -63,7 +63,7 @@ class Delete extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.deleteRows',
replaceWith: 'grids.deleteRows',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -66,7 +66,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateRows',
replaceWith: 'grids.updateRows',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -64,7 +64,7 @@ class Upsert extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.upsertRows',
replaceWith: 'grids.upsertRows',
),
)
])

View file

@ -84,7 +84,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createRow',
replaceWith: 'grids.createRow',
),
),
new Method(
@ -107,7 +107,7 @@ class Create extends Action
],
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createRows',
replaceWith: 'grids.createRows',
),
)
])

View file

@ -65,7 +65,7 @@ class Delete extends Action
contentType: ContentType::NONE,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.deleteRow',
replaceWith: 'grids.deleteRow',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -56,7 +56,7 @@ class Get extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.getRow',
replaceWith: 'grids.getRow',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -62,7 +62,7 @@ class XList extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.listLogs',
replaceWith: 'grids.listRowLogs',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -69,7 +69,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.updateRow',
replaceWith: 'grids.updateRow',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -71,7 +71,7 @@ class Upsert extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.upsertRow',
replaceWith: 'grids.upsertRow',
),
),
])

View file

@ -59,7 +59,7 @@ class XList extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.listRows',
replaceWith: 'grids.listRows',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -50,7 +50,7 @@ class Get extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.get',
replaceWith: 'grids.getTable',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -19,7 +19,7 @@ abstract class Action extends UtopiaAction
public function setHttpPath(string $path): UtopiaAction
{
if (str_contains($path, '/:databaseId/tables')) {
if (str_contains($path, '/:databaseId/grids/tables')) {
$this->context = COLUMN_INDEX;
}
@ -63,7 +63,7 @@ abstract class Action extends UtopiaAction
*/
final protected function getSdkNamespace(): string
{
return $this->isCollectionsAPI() ? 'databases' : 'tables';
return $this->isCollectionsAPI() ? 'databases' : 'grids';
}
/**

View file

@ -65,7 +65,7 @@ class Create extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.createIndex',
replaceWith: 'grids.createIndex',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -60,7 +60,7 @@ class Delete extends Action
contentType: ContentType::NONE,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.deleteIndex',
replaceWith: 'grids.deleteIndex',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -51,7 +51,7 @@ class Get extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.getIndex',
replaceWith: 'grids.getIndex',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -56,7 +56,7 @@ class XList extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.listIndexes',
replaceWith: 'grids.listIndexes',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -62,7 +62,7 @@ class XList extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.listLogs',
replaceWith: 'grids.listTableLogs',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -58,7 +58,7 @@ class Update extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.update',
replaceWith: 'grids.updateTable',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -55,7 +55,7 @@ class Get extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.getUsage',
replaceWith: 'grids.getTableUsage',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -57,7 +57,7 @@ class XList extends Action
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'tables.list',
replaceWith: 'grids.listTables',
),
))
->param('databaseId', '', new UID(), 'Database ID.')

View file

@ -6,6 +6,7 @@ use Appwrite\Event\Event;
use Appwrite\Extend\Exception;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Database\Validator\CustomId;
@ -42,20 +43,40 @@ class Create extends Action
->label('resourceType', RESOURCE_TYPE_DATABASES)
->label('audits.event', 'database.create')
->label('audits.resource', 'database/{response.$id}')
->label('sdk', new Method(
namespace: 'databases',
group: 'databases',
name: 'create',
description: '/docs/references/databases/create.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_CREATED,
model: UtopiaResponse::MODEL_DATABASE,
->label('sdk', [
new Method(
namespace: 'databases',
group: 'databases',
name: 'create',
description: '/docs/references/databases/create.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_CREATED,
model: UtopiaResponse::MODEL_DATABASE,
)
],
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.createDatabase',
)
],
contentType: ContentType::JSON
))
),
new Method(
namespace: 'grids',
group: 'grids',
name: 'createDatabase',
description: '/docs/references/grids/create-database.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_CREATED,
model: UtopiaResponse::MODEL_DATABASE,
)
],
contentType: ContentType::JSON
)
])
->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', '', new Text(128), 'Database name. Max length: 128 chars.')
->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true)

View file

@ -7,6 +7,7 @@ use Appwrite\Event\Event;
use Appwrite\Extend\Exception;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
@ -34,20 +35,40 @@ class Delete extends Action
->label('event', 'databases.[databaseId].delete')
->label('audits.event', 'database.delete')
->label('audits.resource', 'database/{request.databaseId}')
->label('sdk', new Method(
namespace: 'databases',
group: 'databases',
name: 'delete',
description: '/docs/references/databases/delete.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_NOCONTENT,
model: UtopiaResponse::MODEL_NONE,
->label('sdk', [
new Method(
namespace: 'databases',
group: 'databases',
name: 'delete',
description: '/docs/references/databases/delete.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_NOCONTENT,
model: UtopiaResponse::MODEL_NONE,
)
],
contentType: ContentType::NONE,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.deleteDatabase',
)
],
contentType: ContentType::NONE
))
),
new Method(
namespace: 'grids',
group: 'grids',
name: 'deleteDatabase',
description: '/docs/references/grids/delete-database.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_NOCONTENT,
model: UtopiaResponse::MODEL_NONE,
)
],
contentType: ContentType::NONE
),
])
->param('databaseId', '', new UID(), 'Database ID.')
->inject('response')
->inject('dbForProject')

View file

@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases;
use Appwrite\Extend\Exception;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
@ -29,20 +30,40 @@ class Get extends Action
->groups(['api', 'database'])
->label('scope', 'databases.read')
->label('resourceType', RESOURCE_TYPE_DATABASES)
->label('sdk', new Method(
namespace: 'databases',
group: 'databases',
name: 'get',
description: '/docs/references/databases/get.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE,
->label('sdk', [
new Method(
namespace: 'databases',
group: 'databases',
name: 'get',
description: '/docs/references/databases/get.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE,
)
],
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.getDatabase',
)
],
contentType: ContentType::JSON
))
),
new Method(
namespace: 'grids',
group: 'grids',
name: 'getDatabase',
description: '/docs/references/grids/get-database.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE,
)
],
contentType: ContentType::JSON
),
])
->param('databaseId', '', new UID(), 'Database ID.')
->inject('response')
->inject('dbForProject')

View file

@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Logs;
use Appwrite\Extend\Exception;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
@ -41,20 +42,40 @@ class XList extends Action
->groups(['api', 'database'])
->label('scope', 'databases.read')
->label('resourceType', RESOURCE_TYPE_DATABASES)
->label('sdk', new Method(
namespace: 'databases',
group: 'logs',
name: 'listLogs',
description: '/docs/references/databases/get-logs.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_LOG_LIST,
->label('sdk', [
new Method(
namespace: 'databases',
group: 'logs',
name: 'listLogs',
description: '/docs/references/databases/get-logs.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_LOG_LIST,
)
],
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.listDatabaseLogs',
)
],
contentType: ContentType::JSON
))
),
new Method(
namespace: 'grids',
group: 'logs',
name: 'listDatabaseLogs',
description: '/docs/references/grids/list-database-logs.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_LOG_LIST,
)
],
contentType: ContentType::JSON
),
])
->param('databaseId', '', new UID(), 'Database 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')

View file

@ -6,6 +6,7 @@ use Appwrite\Event\Event;
use Appwrite\Extend\Exception;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
@ -35,20 +36,40 @@ class Update extends Action
->label('event', 'databases.[databaseId].update')
->label('audits.event', 'database.update')
->label('audits.resource', 'database/{response.$id}')
->label('sdk', new Method(
namespace: 'databases',
group: 'databases',
name: 'update',
description: '/docs/references/databases/update.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE,
->label('sdk', [
new Method(
namespace: 'databases',
group: 'databases',
name: 'update',
description: '/docs/references/databases/update.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE,
)
],
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.updateDatabase',
)
],
contentType: ContentType::JSON
))
),
new Method(
namespace: 'grids',
group: 'grids',
name: 'updateDatabase',
description: '/docs/references/grids/update-database.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE,
)
],
contentType: ContentType::JSON
),
])
->param('databaseId', '', new UID(), 'Database ID.')
->param('name', null, new Text(128), 'Database name. Max length: 128 chars.')
->param('enabled', true, new Boolean(), 'Is database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true)

View file

@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage;
use Appwrite\Extend\Exception;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
@ -34,20 +35,41 @@ class Get extends Action
->groups(['api', 'database', 'usage'])
->label('scope', 'collections.read')
->label('resourceType', RESOURCE_TYPE_DATABASES)
->label('sdk', new Method(
namespace: 'databases',
group: null,
name: self::getName(),
description: '/docs/references/databases/get-database-usage.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_USAGE_DATABASE,
->label('sdk', [
new Method(
namespace: 'databases',
group: null,
name: self::getName(),
description: '/docs/references/databases/get-database-usage.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_USAGE_DATABASE,
)
],
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.' . self::getName(),
)
],
contentType: ContentType::JSON,
))
),
new Method(
namespace: 'grids',
group: null,
name: self::getName(),
description: '/docs/references/grids/get-database-usage.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_USAGE_DATABASE,
)
],
contentType: ContentType::JSON,
),
])
->param('databaseId', '', new UID(), 'Database ID.')
->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true)
->inject('response')

View file

@ -4,6 +4,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
@ -32,20 +33,40 @@ class XList extends Action
->groups(['api', 'database', 'usage'])
->label('scope', 'collections.read')
->label('resourceType', RESOURCE_TYPE_DATABASES)
->label('sdk', new Method(
namespace: 'databases',
group: null,
name: self::getName(),
description: '/docs/references/databases/list-usage.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_USAGE_DATABASES,
->label('sdk', [
new Method(
namespace: 'databases',
group: null,
name: self::getName(),
description: '/docs/references/databases/list-usage.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_USAGE_DATABASES,
)
],
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.listDatabaseUsage'
)
],
contentType: ContentType::JSON
))
),
new Method(
namespace: 'grids',
group: null,
name: 'listDatabaseUsage',
description: '/docs/references/grids/list-database-usage.md',
auth: [AuthType::ADMIN],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_USAGE_DATABASES,
)
],
contentType: ContentType::JSON
),
])
->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true)
->inject('response')
->inject('dbForProject')

View file

@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases;
use Appwrite\Extend\Exception;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Deprecated;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Database\Validator\Queries\Databases;
@ -35,20 +36,40 @@ class XList extends Action
->groups(['api', 'database'])
->label('scope', 'databases.read')
->label('resourceType', RESOURCE_TYPE_DATABASES)
->label('sdk', new Method(
namespace: 'databases',
group: 'databases',
name: 'list',
description: '/docs/references/databases/list.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE_LIST,
->label('sdk', [
new Method(
namespace: 'databases',
group: 'databases',
name: 'list',
description: '/docs/references/databases/list.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE_LIST,
)
],
contentType: ContentType::JSON,
deprecated: new Deprecated(
since: '1.8.0',
replaceWith: 'grids.listDatabases',
)
],
contentType: ContentType::JSON
))
),
new Method(
namespace: 'grids',
group: 'grids',
name: 'listDatabases',
description: '/docs/references/grids/list-databases.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: SwooleResponse::STATUS_CODE_OK,
model: UtopiaResponse::MODEL_DATABASE_LIST,
)
],
contentType: ContentType::JSON
),
])
->param('queries', [], new Databases(), '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(', ', Databases::ALLOWED_ATTRIBUTES), true)
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->inject('response')

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Create as BooleanCreate;
use Appwrite\SDK\AuthType;
@ -28,7 +28,7 @@ class Create extends BooleanCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean')
->desc('Create boolean column')
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create')
@ -40,7 +40,7 @@ class Create extends BooleanCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-boolean-column.md',
description: '/docs/references/grids/create-boolean-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Update as BooleanUpdate;
use Appwrite\SDK\AuthType;
@ -30,7 +30,7 @@ class Update extends BooleanUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean/:key')
->desc('Update boolean column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -42,7 +42,7 @@ class Update extends BooleanUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-boolean-column.md',
description: '/docs/references/grids/update-boolean-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Create as DatetimeCreate;
use Appwrite\SDK\AuthType;
@ -30,7 +30,7 @@ class Create extends DatetimeCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime')
->desc('Create datetime column')
->groups(['api', 'database'])
->label('scope', 'tables.write')
@ -42,7 +42,7 @@ class Create extends DatetimeCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-datetime-column.md',
description: '/docs/references/grids/create-datetime-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Update as DatetimeUpdate;
use Appwrite\SDK\AuthType;
@ -32,7 +32,7 @@ class Update extends DatetimeUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime/:key')
->desc('Update dateTime column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -44,7 +44,7 @@ class Update extends DatetimeUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-datetime-column.md',
description: '/docs/references/grids/update-datetime-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Delete as AttributesDelete;
use Appwrite\SDK\AuthType;
@ -29,7 +29,7 @@ class Delete extends AttributesDelete
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key')
->desc('Delete column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -41,7 +41,7 @@ class Delete extends AttributesDelete
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/delete-column.md',
description: '/docs/references/grids/delete-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email;
use Appwrite\Network\Validator\Email;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Create as EmailCreate;
@ -29,7 +29,7 @@ class Create extends EmailCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email')
->desc('Create email column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -41,7 +41,7 @@ class Create extends EmailCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-email-column.md',
description: '/docs/references/grids/create-email-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email;
use Appwrite\Network\Validator\Email;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Update as EmailUpdate;
@ -31,7 +31,7 @@ class Update extends EmailUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email/:key')
->desc('Update email column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -43,7 +43,7 @@ class Update extends EmailUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-email-column.md',
description: '/docs/references/grids/update-email-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Create as EnumCreate;
use Appwrite\SDK\AuthType;
@ -31,7 +31,7 @@ class Create extends EnumCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum')
->desc('Create enum column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -43,7 +43,7 @@ class Create extends EnumCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-enum-column.md',
description: '/docs/references/grids/create-enum-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Update as EnumUpdate;
use Appwrite\SDK\AuthType;
@ -33,7 +33,7 @@ class Update extends EnumUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum/:key')
->desc('Update enum column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -45,7 +45,7 @@ class Update extends EnumUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-enum-column.md',
description: '/docs/references/grids/update-enum-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Create as FloatCreate;
use Appwrite\SDK\AuthType;
@ -29,7 +29,7 @@ class Create extends FloatCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float')
->desc('Create float column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -41,7 +41,7 @@ class Create extends FloatCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-float-column.md',
description: '/docs/references/grids/create-float-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Update as FloatUpdate;
use Appwrite\SDK\AuthType;
@ -31,7 +31,7 @@ class Update extends FloatUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float/:key')
->desc('Update float column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -43,7 +43,7 @@ class Update extends FloatUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-float-column.md',
description: '/docs/references/grids/update-float-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Get as AttributesGet;
use Appwrite\SDK\AuthType;
@ -38,7 +38,7 @@ class Get extends AttributesGet
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key')
->desc('Get column')
->groups(['api', 'database'])
->label('scope', 'tables.read')
@ -47,7 +47,7 @@ class Get extends AttributesGet
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/get-column.md',
description: '/docs/references/grids/get-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Create as IPCreate;
use Appwrite\SDK\AuthType;
@ -29,7 +29,7 @@ class Create extends IPCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip')
->desc('Create IP address column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -41,7 +41,7 @@ class Create extends IPCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-ip-column.md',
description: '/docs/references/grids/create-ip-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Update as IPUpdate;
use Appwrite\SDK\AuthType;
@ -31,7 +31,7 @@ class Update extends IPUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip/:key')
->desc('Update IP address column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -43,7 +43,7 @@ class Update extends IPUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-ip-column.md',
description: '/docs/references/grids/update-ip-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Create as IntegerCreate;
use Appwrite\SDK\AuthType;
@ -29,7 +29,7 @@ class Create extends IntegerCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer')
->desc('Create integer column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -41,7 +41,7 @@ class Create extends IntegerCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-integer-column.md',
description: '/docs/references/grids/create-integer-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Update as IntegerUpdate;
use Appwrite\SDK\AuthType;
@ -31,7 +31,7 @@ class Update extends IntegerUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer/:key')
->desc('Update integer column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -43,7 +43,7 @@ class Update extends IntegerUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-integer-column.md',
description: '/docs/references/grids/update-integer-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Create as RelationshipCreate;
use Appwrite\SDK\AuthType;
@ -30,7 +30,7 @@ class Create extends RelationshipCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/relationship')
->desc('Create relationship column')
->groups(['api', 'database'])
->label('scope', 'tables.write')
@ -42,7 +42,7 @@ class Create extends RelationshipCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-relationship-column.md',
description: '/docs/references/grids/create-relationship-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Update as RelationshipUpdate;
use Appwrite\SDK\AuthType;
@ -30,7 +30,7 @@ class Update extends RelationshipUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key/relationship')
->desc('Update relationship column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -42,7 +42,7 @@ class Update extends RelationshipUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-relationship-column.md',
description: '/docs/references/grids/update-relationship-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Create as StringCreate;
use Appwrite\SDK\AuthType;
@ -31,7 +31,7 @@ class Create extends StringCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string')
->desc('Create string column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -43,7 +43,7 @@ class Create extends StringCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-string-column.md',
description: '/docs/references/grids/create-string-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Update as StringUpdate;
use Appwrite\SDK\AuthType;
@ -33,7 +33,7 @@ class Update extends StringUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string/:key')
->desc('Update string column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -45,7 +45,7 @@ class Update extends StringUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-string-column.md',
description: '/docs/references/grids/update-string-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Create as URLCreate;
use Appwrite\SDK\AuthType;
@ -29,7 +29,7 @@ class Create extends URLCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url')
->desc('Create URL column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -41,7 +41,7 @@ class Create extends URLCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/create-url-column.md',
description: '/docs/references/grids/create-url-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Update as URLUpdate;
use Appwrite\SDK\AuthType;
@ -31,7 +31,7 @@ class Update extends URLUpdate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url/:key')
->desc('Update URL column')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -43,7 +43,7 @@ class Update extends URLUpdate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/update-url-column.md',
description: '/docs/references/grids/update-url-column.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as AttributesXList;
use Appwrite\SDK\AuthType;
@ -27,7 +27,7 @@ class XList extends AttributesXList
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns')
->desc('List columns')
->groups(['api', 'database'])
->label('scope', 'tables.read')
@ -36,7 +36,7 @@ class XList extends AttributesXList
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: self::getName(),
description: '/docs/references/databases/list-attributes.md',
description: '/docs/references/grids/list-columns.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CollectionCreate;
use Appwrite\SDK\AuthType;
@ -19,7 +19,7 @@ class Create extends CollectionCreate
{
public static function getName(): string
{
return 'create';
return 'createTable';
}
protected function getResponseModel(): string
@ -31,7 +31,7 @@ class Create extends CollectionCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables')
->setHttpPath('/v1/databases/:databaseId/grids/tables')
->desc('Create table')
->groups(['api', 'database'])
->label('event', 'databases.[databaseId].tables.[tableId].create')
@ -43,7 +43,7 @@ class Create extends CollectionCreate
namespace: $this->getSdkNamespace(),
group: null,
name: self::getName(),
description: '/docs/references/databases/create-table.md',
description: '/docs/references/grids/create-table.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete;
use Appwrite\SDK\AuthType;
@ -15,7 +15,7 @@ class Delete extends CollectionDelete
{
public static function getName(): string
{
return 'delete';
return 'deleteTable';
}
protected function getResponseModel(): string
@ -27,7 +27,7 @@ class Delete extends CollectionDelete
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId')
->desc('Delete table')
->groups(['api', 'database', 'schema'])
->label('scope', 'tables.write')
@ -39,7 +39,7 @@ class Delete extends CollectionDelete
namespace: $this->getSdkNamespace(),
group: null,
name: self::getName(),
description: '/docs/references/databases/delete-table.md',
description: '/docs/references/grids/delete-table.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as CollectionGet;
use Appwrite\SDK\AuthType;
@ -15,7 +15,7 @@ class Get extends CollectionGet
{
public static function getName(): string
{
return 'get';
return 'getTable';
}
protected function getResponseModel(): string
@ -27,7 +27,7 @@ class Get extends CollectionGet
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId')
->desc('Get table')
->groups(['api', 'database'])
->label('scope', 'tables.read')
@ -36,7 +36,7 @@ class Get extends CollectionGet
namespace: $this->getSdkNamespace(),
group: null,
name: self::getName(),
description: '/docs/references/databases/get-table.md',
description: '/docs/references/grids/get-table.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

View file

@ -1,6 +1,6 @@
<?php
namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes;
namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes;
use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate;
use Appwrite\SDK\AuthType;
@ -33,7 +33,7 @@ class Create extends IndexCreate
{
$this
->setHttpMethod(self::HTTP_REQUEST_METHOD_POST)
->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes')
->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes')
->desc('Create index')
->groups(['api', 'database'])
->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create')
@ -45,7 +45,7 @@ class Create extends IndexCreate
namespace: $this->getSdkNamespace(),
group: $this->getSdkGroup(),
name: 'createIndex', // getName needs to be different from parent action to avoid conflict in path name
description: '/docs/references/databases/create-index.md',
description: '/docs/references/grids/create-index.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(

Some files were not shown because too many files have changed in this diff Show more