Add grids params

This commit is contained in:
Jake Barnby 2025-08-15 01:05:03 +12:00
parent 0533568f9e
commit bed46be720
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -69,6 +69,7 @@ class Create extends DocumentCreate
new Parameter('rowId', optional: false),
new Parameter('data', optional: false),
new Parameter('permissions', optional: true),
new Parameter('transactionId', optional: true),
]
),
new Method(
@ -89,6 +90,7 @@ class Create extends DocumentCreate
new Parameter('databaseId', optional: false),
new Parameter('tableId', optional: false),
new Parameter('rows', optional: false),
new Parameter('transactionId', optional: true),
]
)
])
@ -97,7 +99,7 @@ class Create extends DocumentCreate
->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows.')
->param('data', [], new JSON(), 'Row data as JSON object.', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan'])
->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of rows data as JSON objects.', true, ['plan'])
->param('transactionId', null, new UID(), 'Transaction ID for staging the operation.', true)
->inject('response')
->inject('dbForProject')