Merge branch '1.6.x' of https://github.com/appwrite/appwrite into fix-scheduled-executions

This commit is contained in:
Matej Bačo
2024-09-10 10:38:01 +00:00
171 changed files with 1223 additions and 212 deletions
+5
View File
@@ -699,6 +699,11 @@ return [
'description' => 'The relationship value is invalid.',
'code' => 400,
],
Exception::ATTRIBUTE_INVALID_RESIZE => [
'name' => Exception::ATTRIBUTE_INVALID_RESIZE,
'description' => "Existing data is too large for new size, truncate your existing data then try again.",
'code' => 400,
],
/** Indexes */
Exception::INDEX_NOT_FOUND => [
+10 -10
View File
@@ -203,7 +203,7 @@ return [
[
'key' => 'web',
'name' => 'Console',
'version' => '1.0.1',
'version' => '1.1.0',
'url' => 'https://github.com/appwrite/sdk-for-console',
'package' => '',
'enabled' => true,
@@ -249,7 +249,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '14.0.0',
'version' => '14.1.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@@ -267,7 +267,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '12.0.0',
'version' => '12.1.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@@ -303,7 +303,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '6.0.0',
'version' => '6.1.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@@ -321,7 +321,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '12.0.0',
'version' => '12.1.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@@ -339,7 +339,7 @@ return [
[
'key' => 'go',
'name' => 'Go',
'version' => '0.1.0',
'version' => '0.2.0',
'url' => 'https://github.com/appwrite/sdk-for-go',
'package' => 'https://github.com/appwrite/sdk-for-go',
'enabled' => true,
@@ -357,7 +357,7 @@ return [
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.9.0',
'version' => '0.10.0',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
@@ -375,7 +375,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '12.0.0',
'version' => '12.1.0',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@@ -393,7 +393,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '6.0.0',
'version' => '6.1.0',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@@ -415,7 +415,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '6.0.0',
'version' => '6.1.0',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -4018,7 +4018,7 @@ App::post('/v1/account/mfa/challenge')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_MFA_CHALLENGE)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},token:{param-token}')
->label('abuse-key', 'url:{url},userId:{userId}')
->param('factor', '', new WhiteList([Type::EMAIL, Type::PHONE, Type::TOTP, Type::RECOVERY_CODE]), 'Factor used for verification. Must be one of following: `' . Type::EMAIL . '`, `' . Type::PHONE . '`, `' . Type::TOTP . '`, `' . Type::RECOVERY_CODE . '`.')
->inject('response')
->inject('dbForProject')
@@ -4205,7 +4205,7 @@ App::put('/v1/account/mfa/challenge')
->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT)
->label('sdk.response.model', Response::MODEL_SESSION)
->label('abuse-limit', 10)
->label('abuse-key', 'userId:{param-userId}')
->label('abuse-key', 'url:{url},challengeId:{param-challengeId}')
->param('challengeId', '', new Text(256), 'ID of the challenge.')
->param('otp', '', new Text(256), 'Valid verification token.')
->inject('project')
+92 -28
View File
@@ -20,12 +20,15 @@ use Utopia\Audit\Audit;
use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\Exception as DatabaseException;
use Utopia\Database\Exception\Authorization as AuthorizationException;
use Utopia\Database\Exception\Conflict as ConflictException;
use Utopia\Database\Exception\Duplicate as DuplicateException;
use Utopia\Database\Exception\Limit as LimitException;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Exception\Restricted as RestrictedException;
use Utopia\Database\Exception\Structure as StructureException;
use Utopia\Database\Exception\Truncate as TruncateException;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role;
@@ -228,13 +231,15 @@ function updateAttribute(
Database $dbForProject,
Event $queueForEvents,
string $type,
int $size = null,
string $filter = null,
string|bool|int|float $default = null,
bool $required = null,
int|float $min = null,
int|float $max = null,
array $elements = null,
array $options = []
array $options = [],
string $newKey = null,
): Document {
$db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
@@ -280,6 +285,10 @@ function updateAttribute(
->setAttribute('default', $default)
->setAttribute('required', $required);
if (!empty($size)) {
$attribute->setAttribute('size', $size);
}
$formatOptions = $attribute->getAttribute('formatOptions');
switch ($attribute->getAttribute('format')) {
@@ -345,6 +354,7 @@ function updateAttribute(
$dbForProject->updateRelationship(
collection: $collectionId,
id: $key,
newKey: $newKey,
onDelete: $primaryDocumentOptions['onDelete'],
);
@@ -352,22 +362,52 @@ function updateAttribute(
$relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryDocumentOptions['relatedCollection']);
$relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey']);
if (!empty($newKey) && $newKey !== $key) {
$options['twoWayKey'] = $newKey;
}
$relatedOptions = \array_merge($relatedAttribute->getAttribute('options'), $options);
$relatedAttribute->setAttribute('options', $relatedOptions);
$dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey'], $relatedAttribute);
$dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId());
}
} else {
$dbForProject->updateAttribute(
collection: $collectionId,
id: $key,
required: $required,
default: $default,
formatOptions: $options ?? null
);
try {
$dbForProject->updateAttribute(
collection: $collectionId,
id: $key,
size: $size,
required: $required,
default: $default,
formatOptions: $options ?? null,
newKey: $newKey ?? null
);
} catch (TruncateException) {
throw new Exception(Exception::ATTRIBUTE_INVALID_RESIZE);
}
}
if (!empty($newKey) && $key !== $newKey) {
// Delete attribute and recreate since we can't modify IDs
$original = clone $attribute;
$dbForProject->deleteDocument('attributes', $attribute->getId());
$attribute
->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $newKey))
->setAttribute('key', $newKey);
try {
$attribute = $dbForProject->createDocument('attributes', $attribute);
} catch (DatabaseException|PDOException) {
$attribute = $dbForProject->createDocument('attributes', $original);
}
} else {
$attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute);
}
$attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute);
$dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collection->getId());
$queueForEvents
@@ -1152,6 +1192,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string
'filters' => $filters,
]), $response, $dbForProject, $queueForDatabase, $queueForEvents);
$response
->setStatusCode(Response::STATUS_CODE_ACCEPTED)
->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING);
@@ -1859,10 +1900,12 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('size', null, new Integer(), 'Maximum size of the string attribute.', true)
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?int $size, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
@@ -1871,8 +1914,10 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin
dbForProject: $dbForProject,
queueForEvents: $queueForEvents,
type: Database::VAR_STRING,
size: $size,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -1898,10 +1943,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Email()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -1911,7 +1957,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email
type: Database::VAR_STRING,
filter: APP_DATABASE_ATTRIBUTE_EMAIL,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -1938,10 +1985,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/
->param('elements', null, new ArrayList(new Text(DATABASE::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . DATABASE::LENGTH_KEY . ' characters long.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?array $elements, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?array $elements, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -1952,7 +2000,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/
filter: APP_DATABASE_ATTRIBUTE_ENUM,
default: $default,
required: $required,
elements: $elements
elements: $elements,
newKey: $newKey
);
$response
@@ -1978,10 +2027,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:k
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new IP()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -1991,7 +2041,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:k
type: Database::VAR_STRING,
filter: APP_DATABASE_ATTRIBUTE_IP,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2017,10 +2068,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/:
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new URL()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2030,7 +2082,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/:
type: Database::VAR_STRING,
filter: APP_DATABASE_ATTRIBUTE_URL,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2058,10 +2111,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ
->param('min', null, new Integer(), 'Minimum value to enforce on new documents')
->param('max', null, new Integer(), 'Maximum value to enforce on new documents')
->param('default', null, new Nullable(new Integer()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2072,7 +2126,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ
default: $default,
required: $required,
min: $min,
max: $max
max: $max,
newKey: $newKey
);
$formatOptions = $attribute->getAttribute('formatOptions', []);
@@ -2107,10 +2162,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float
->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents')
->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents')
->param('default', null, new Nullable(new FloatValidator()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2121,7 +2177,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float
default: $default,
required: $required,
min: $min,
max: $max
max: $max,
newKey: $newKey
);
$formatOptions = $attribute->getAttribute('formatOptions', []);
@@ -2154,10 +2211,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boole
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Boolean()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2166,7 +2224,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boole
queueForEvents: $queueForEvents,
type: Database::VAR_BOOLEAN,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2192,10 +2251,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new DatetimeValidator()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2204,7 +2264,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet
queueForEvents: $queueForEvents,
type: Database::VAR_DATETIME,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2229,6 +2290,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
->param('key', '', new Key(), 'Attribute Key.')
->param('onDelete', null, new WhiteList([Database::RELATION_MUTATE_CASCADE, Database::RELATION_MUTATE_RESTRICT, Database::RELATION_MUTATE_SET_NULL], true), 'Constraints option', true)
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
@@ -2237,6 +2299,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/
string $collectionId,
string $key,
?string $onDelete,
?string $newKey,
Response $response,
Database $dbForProject,
Event $queueForEvents
@@ -2251,7 +2314,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/
required: false,
options: [
'onDelete' => $onDelete
]
],
newKey: $newKey
);
$options = $attribute->getAttribute('options', []);
+2 -2
View File
@@ -223,8 +223,8 @@ const API_KEY_DYNAMIC = 'dynamic';
// Usage metrics
const METRIC_TEAMS = 'teams';
const METRIC_USERS = 'users';
const METRIC_MESSAGES = 'messages';
const METRIC_MESSAGES_COUNTRY_CODE = '{countryCode}.messages';
const METRIC_AUTH_METHOD_PHONE = 'auth.method.phone';
const METRIC_AUTH_METHOD_PHONE_COUNTRY_CODE = METRIC_AUTH_METHOD_PHONE . '.{countryCode}';
const METRIC_SESSIONS = 'sessions';
const METRIC_DATABASES = 'databases';
const METRIC_COLLECTIONS = 'collections';
+1 -1
View File
@@ -166,7 +166,7 @@ $image = $this->getParam('image', '');
appwrite-console:
<<: *x-logging
container_name: appwrite-console
image: <?php echo $organization; ?>/console:5.0.10
image: <?php echo $organization; ?>/console:5.0.11
restart: unless-stopped
networks:
- appwrite
+3 -3
View File
@@ -45,13 +45,13 @@
"ext-sockets": "*",
"appwrite/php-runtimes": "0.15.*",
"appwrite/php-clamav": "2.0.*",
"utopia-php/abuse": "0.42.0",
"utopia-php/abuse": "0.43.0",
"utopia-php/analytics": "0.10.*",
"utopia-php/audit": "0.42.0",
"utopia-php/audit": "0.43.0",
"utopia-php/cache": "0.10.*",
"utopia-php/cli": "0.15.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.52.*",
"utopia-php/database": "0.53.*",
"utopia-php/domains": "0.5.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "0.33.*",
Generated
+27 -27
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": "eba741eab8bb748ed684c32711d472df",
"content-hash": "b6820da26239716cf14a445697902a03",
"packages": [
{
"name": "adhocore/jwt",
@@ -1429,16 +1429,16 @@
},
{
"name": "utopia-php/abuse",
"version": "0.42.0",
"version": "0.43.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/abuse.git",
"reference": "08cf17e7f4fd213966c8d8702e406f2269244f0f"
"reference": "6346a3b4c5177a43160035a7289e30fdfb0790d6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/08cf17e7f4fd213966c8d8702e406f2269244f0f",
"reference": "08cf17e7f4fd213966c8d8702e406f2269244f0f",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/6346a3b4c5177a43160035a7289e30fdfb0790d6",
"reference": "6346a3b4c5177a43160035a7289e30fdfb0790d6",
"shasum": ""
},
"require": {
@@ -1446,7 +1446,7 @@
"ext-pdo": "*",
"ext-redis": "*",
"php": ">=8.0",
"utopia-php/database": "0.52.*"
"utopia-php/database": "0.53.*"
},
"require-dev": {
"laravel/pint": "1.5.*",
@@ -1474,9 +1474,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/abuse/issues",
"source": "https://github.com/utopia-php/abuse/tree/0.42.0"
"source": "https://github.com/utopia-php/abuse/tree/0.43.0"
},
"time": "2024-08-21T08:24:01+00:00"
"time": "2024-08-30T05:17:23+00:00"
},
{
"name": "utopia-php/analytics",
@@ -1526,21 +1526,21 @@
},
{
"name": "utopia-php/audit",
"version": "0.42.0",
"version": "0.43.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/audit.git",
"reference": "9dc168470625bcf11ff8cd9ab5660db09129f618"
"reference": "cef22b5dc6a6d28fcd522f41c7bf7ded4a4dfd3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/9dc168470625bcf11ff8cd9ab5660db09129f618",
"reference": "9dc168470625bcf11ff8cd9ab5660db09129f618",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/cef22b5dc6a6d28fcd522f41c7bf7ded4a4dfd3e",
"reference": "cef22b5dc6a6d28fcd522f41c7bf7ded4a4dfd3e",
"shasum": ""
},
"require": {
"php": ">=8.0",
"utopia-php/database": "0.52.*"
"utopia-php/database": "0.53.*"
},
"require-dev": {
"laravel/pint": "1.5.*",
@@ -1567,9 +1567,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/audit/issues",
"source": "https://github.com/utopia-php/audit/tree/0.42.0"
"source": "https://github.com/utopia-php/audit/tree/0.43.0"
},
"time": "2024-08-21T08:24:08+00:00"
"time": "2024-08-30T05:17:36+00:00"
},
{
"name": "utopia-php/cache",
@@ -1723,16 +1723,16 @@
},
{
"name": "utopia-php/database",
"version": "0.52.2",
"version": "0.53.4",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "24b29bcac7eb7a8b81698a80bb75fc5909f4975e"
"reference": "36a0e89d983afc1368635282e04fa762220a1d2a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/24b29bcac7eb7a8b81698a80bb75fc5909f4975e",
"reference": "24b29bcac7eb7a8b81698a80bb75fc5909f4975e",
"url": "https://api.github.com/repos/utopia-php/database/zipball/36a0e89d983afc1368635282e04fa762220a1d2a",
"reference": "36a0e89d983afc1368635282e04fa762220a1d2a",
"shasum": ""
},
"require": {
@@ -1773,9 +1773,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.52.2"
"source": "https://github.com/utopia-php/database/tree/0.53.4"
},
"time": "2024-09-02T06:28:50+00:00"
"time": "2024-09-10T10:19:57+00:00"
},
{
"name": "utopia-php/domains",
@@ -2993,16 +2993,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.39.18",
"version": "0.39.19",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "3f12532d3a41f6e3e7528f41c0e79a6d473c4a4c"
"reference": "d5653a2f744d2c297d44f99ff68bfc26c1a3b804"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3f12532d3a41f6e3e7528f41c0e79a6d473c4a4c",
"reference": "3f12532d3a41f6e3e7528f41c0e79a6d473c4a4c",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d5653a2f744d2c297d44f99ff68bfc26c1a3b804",
"reference": "d5653a2f744d2c297d44f99ff68bfc26c1a3b804",
"shasum": ""
},
"require": {
@@ -3038,9 +3038,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.39.18"
"source": "https://github.com/appwrite/sdk-generator/tree/0.39.19"
},
"time": "2024-08-27T11:22:14+00:00"
"time": "2024-08-30T12:04:18+00:00"
},
{
"name": "doctrine/annotations",
+1 -1
View File
@@ -196,7 +196,7 @@ services:
appwrite-console:
<<: *x-logging
container_name: appwrite-console
image: appwrite/console:5.0.10
image: appwrite/console:5.0.11
restart: unless-stopped
networks:
- appwrite
@@ -11,7 +11,8 @@ const result = await databases.updateBooleanAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
false // default
false, // default
'' // newKey (optional)
);
console.log(result);
@@ -11,7 +11,8 @@ const result = await databases.updateDatetimeAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'' // default
'', // default
'' // newKey (optional)
);
console.log(result);
@@ -11,7 +11,8 @@ const result = await databases.updateEmailAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'email@example.com' // default
'email@example.com', // default
'' // newKey (optional)
);
console.log(result);
@@ -12,7 +12,8 @@ const result = await databases.updateEnumAttribute(
'', // key
[], // elements
false, // required
'<DEFAULT>' // default
'<DEFAULT>', // default
'' // newKey (optional)
);
console.log(result);
@@ -13,7 +13,8 @@ const result = await databases.updateFloatAttribute(
false, // required
null, // min
null, // max
null // default
null, // default
'' // newKey (optional)
);
console.log(result);
@@ -13,7 +13,8 @@ const result = await databases.updateIntegerAttribute(
false, // required
null, // min
null, // max
null // default
null, // default
'' // newKey (optional)
);
console.log(result);
@@ -11,7 +11,8 @@ const result = await databases.updateIpAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'' // default
'', // default
'' // newKey (optional)
);
console.log(result);
@@ -10,7 +10,8 @@ const result = await databases.updateRelationshipAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
RelationMutate.Cascade // onDelete (optional)
RelationMutate.Cascade, // onDelete (optional)
'' // newKey (optional)
);
console.log(result);
@@ -11,7 +11,9 @@ const result = await databases.updateStringAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'<DEFAULT>' // default
'<DEFAULT>', // default
null, // size (optional)
'' // newKey (optional)
);
console.log(result);
@@ -11,7 +11,8 @@ const result = await databases.updateUrlAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'https://example.com' // default
'https://example.com', // default
'' // newKey (optional)
);
console.log(result);
@@ -13,4 +13,5 @@ AttributeBoolean result = await databases.updateBooleanAttribute(
key: '',
xrequired: false,
xdefault: false,
newKey: '', // (optional)
);
@@ -13,4 +13,5 @@ AttributeDatetime result = await databases.updateDatetimeAttribute(
key: '',
xrequired: false,
xdefault: '',
newKey: '', // (optional)
);
@@ -13,4 +13,5 @@ AttributeEmail result = await databases.updateEmailAttribute(
key: '',
xrequired: false,
xdefault: 'email@example.com',
newKey: '', // (optional)
);
@@ -14,4 +14,5 @@ AttributeEnum result = await databases.updateEnumAttribute(
elements: [],
xrequired: false,
xdefault: '<DEFAULT>',
newKey: '', // (optional)
);
@@ -15,4 +15,5 @@ AttributeFloat result = await databases.updateFloatAttribute(
min: 0,
max: 0,
xdefault: 0,
newKey: '', // (optional)
);
@@ -15,4 +15,5 @@ AttributeInteger result = await databases.updateIntegerAttribute(
min: 0,
max: 0,
xdefault: 0,
newKey: '', // (optional)
);
@@ -13,4 +13,5 @@ AttributeIp result = await databases.updateIpAttribute(
key: '',
xrequired: false,
xdefault: '',
newKey: '', // (optional)
);
@@ -12,4 +12,5 @@ AttributeRelationship result = await databases.updateRelationshipAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
onDelete: RelationMutate.cascade, // (optional)
newKey: '', // (optional)
);
@@ -13,4 +13,6 @@ AttributeString result = await databases.updateStringAttribute(
key: '',
xrequired: false,
xdefault: '<DEFAULT>',
size: 0, // (optional)
newKey: '', // (optional)
);
@@ -13,4 +13,5 @@ AttributeUrl result = await databases.updateUrlAttribute(
key: '',
xrequired: false,
xdefault: 'https://example.com',
newKey: '', // (optional)
);
@@ -1,3 +1,4 @@
import 'dart:io';
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
@@ -12,5 +12,6 @@ const response = await databases.updateBooleanAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
false // default
false, // default
'' // newKey (optional)
);
@@ -12,5 +12,6 @@ const response = await databases.updateDatetimeAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'' // default
'', // default
'' // newKey (optional)
);
@@ -12,5 +12,6 @@ const response = await databases.updateEmailAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'email@example.com' // default
'email@example.com', // default
'' // newKey (optional)
);
@@ -13,5 +13,6 @@ const response = await databases.updateEnumAttribute(
'', // key
[], // elements
false, // required
'<DEFAULT>' // default
'<DEFAULT>', // default
'' // newKey (optional)
);
@@ -14,5 +14,6 @@ const response = await databases.updateFloatAttribute(
false, // required
null, // min
null, // max
null // default
null, // default
'' // newKey (optional)
);
@@ -14,5 +14,6 @@ const response = await databases.updateIntegerAttribute(
false, // required
null, // min
null, // max
null // default
null, // default
'' // newKey (optional)
);
@@ -12,5 +12,6 @@ const response = await databases.updateIpAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'' // default
'', // default
'' // newKey (optional)
);
@@ -11,5 +11,6 @@ const response = await databases.updateRelationshipAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
RelationMutate.Cascade // onDelete (optional)
RelationMutate.Cascade, // onDelete (optional)
'' // newKey (optional)
);
@@ -12,5 +12,7 @@ const response = await databases.updateStringAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'<DEFAULT>' // default
'<DEFAULT>', // default
null, // size (optional)
'' // newKey (optional)
);
@@ -12,5 +12,6 @@ const response = await databases.updateUrlAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
'https://example.com' // default
'https://example.com', // default
'' // newKey (optional)
);
@@ -14,5 +14,6 @@ AttributeBoolean result = await databases.UpdateBooleanAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: false
default: false,
newKey: "" // optional
);
@@ -14,5 +14,6 @@ AttributeDatetime result = await databases.UpdateDatetimeAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: ""
default: "",
newKey: "" // optional
);
@@ -14,5 +14,6 @@ AttributeEmail result = await databases.UpdateEmailAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "email@example.com"
default: "email@example.com",
newKey: "" // optional
);
@@ -15,5 +15,6 @@ AttributeEnum result = await databases.UpdateEnumAttribute(
key: "",
elements: new List<string>(),
required: false,
default: "<DEFAULT>"
default: "<DEFAULT>",
newKey: "" // optional
);
@@ -16,5 +16,6 @@ AttributeFloat result = await databases.UpdateFloatAttribute(
required: false,
min: 0,
max: 0,
default: 0
default: 0,
newKey: "" // optional
);
@@ -16,5 +16,6 @@ AttributeInteger result = await databases.UpdateIntegerAttribute(
required: false,
min: 0,
max: 0,
default: 0
default: 0,
newKey: "" // optional
);
@@ -14,5 +14,6 @@ AttributeIp result = await databases.UpdateIpAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: ""
default: "",
newKey: "" // optional
);
@@ -14,5 +14,6 @@ AttributeRelationship result = await databases.UpdateRelationshipAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
onDelete: RelationMutate.Cascade // optional
onDelete: RelationMutate.Cascade, // optional
newKey: "" // optional
);
@@ -14,5 +14,7 @@ AttributeString result = await databases.UpdateStringAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "<DEFAULT>"
default: "<DEFAULT>",
size: 0, // optional
newKey: "" // optional
);
@@ -14,5 +14,6 @@ AttributeUrl result = await databases.UpdateUrlAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "https://example.com"
default: "https://example.com",
newKey: "" // optional
);
@@ -20,6 +20,7 @@ func main() {
"",
false,
false,
databases.WithUpdateBooleanAttributeNewKey(""),
)
if error != nil {
@@ -20,6 +20,7 @@ func main() {
"",
false,
"",
databases.WithUpdateDatetimeAttributeNewKey(""),
)
if error != nil {
@@ -20,6 +20,7 @@ func main() {
"",
false,
"email@example.com",
databases.WithUpdateEmailAttributeNewKey(""),
)
if error != nil {
@@ -21,6 +21,7 @@ func main() {
[]interface{}{},
false,
"<DEFAULT>",
databases.WithUpdateEnumAttributeNewKey(""),
)
if error != nil {
@@ -22,6 +22,7 @@ func main() {
0,
0,
0,
databases.WithUpdateFloatAttributeNewKey(""),
)
if error != nil {
@@ -22,6 +22,7 @@ func main() {
0,
0,
0,
databases.WithUpdateIntegerAttributeNewKey(""),
)
if error != nil {
@@ -20,6 +20,7 @@ func main() {
"",
false,
"",
databases.WithUpdateIpAttributeNewKey(""),
)
if error != nil {
@@ -19,6 +19,7 @@ func main() {
"<COLLECTION_ID>",
"",
databases.WithUpdateRelationshipAttributeOnDelete("cascade"),
databases.WithUpdateRelationshipAttributeNewKey(""),
)
if error != nil {
@@ -20,6 +20,8 @@ func main() {
"",
false,
"<DEFAULT>",
databases.WithUpdateStringAttributeSize(0),
databases.WithUpdateStringAttributeNewKey(""),
)
if error != nil {
@@ -20,6 +20,7 @@ func main() {
"",
false,
"https://example.com",
databases.WithUpdateUrlAttributeNewKey(""),
)
if error != nil {
@@ -4,7 +4,8 @@ mutation {
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: false
default: false,
newKey: ""
) {
key
type
@@ -4,7 +4,8 @@ mutation {
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: ""
default: "",
newKey: ""
) {
key
type
@@ -4,7 +4,8 @@ mutation {
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "email@example.com"
default: "email@example.com",
newKey: ""
) {
key
type
@@ -5,7 +5,8 @@ mutation {
key: "",
elements: [],
required: false,
default: "<DEFAULT>"
default: "<DEFAULT>",
newKey: ""
) {
key
type
@@ -6,7 +6,8 @@ mutation {
required: false,
min: 0,
max: 0,
default: 0
default: 0,
newKey: ""
) {
key
type
@@ -6,7 +6,8 @@ mutation {
required: false,
min: 0,
max: 0,
default: 0
default: 0,
newKey: ""
) {
key
type
@@ -4,7 +4,8 @@ mutation {
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: ""
default: "",
newKey: ""
) {
key
type
@@ -3,7 +3,8 @@ mutation {
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
onDelete: "cascade"
onDelete: "cascade",
newKey: ""
) {
key
type
@@ -4,7 +4,9 @@ mutation {
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "<DEFAULT>"
default: "<DEFAULT>",
size: 0,
newKey: ""
) {
key
type
@@ -4,7 +4,8 @@ mutation {
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "https://example.com"
default: "https://example.com",
newKey: ""
) {
key
type
@@ -15,6 +15,7 @@ databases.updateBooleanAttribute(
"", // key
false, // required
false, // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -15,6 +15,7 @@ databases.updateDatetimeAttribute(
"", // key
false, // required
"", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -15,6 +15,7 @@ databases.updateEmailAttribute(
"", // key
false, // required
"email@example.com", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -16,6 +16,7 @@ databases.updateEnumAttribute(
listOf(), // elements
false, // required
"<DEFAULT>", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -17,6 +17,7 @@ databases.updateFloatAttribute(
0, // min
0, // max
0, // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -17,6 +17,7 @@ databases.updateIntegerAttribute(
0, // min
0, // max
0, // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -15,6 +15,7 @@ databases.updateIpAttribute(
"", // key
false, // required
"", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -14,6 +14,7 @@ databases.updateRelationshipAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
RelationMutate.CASCADE, // onDelete (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -15,6 +15,8 @@ databases.updateStringAttribute(
"", // key
false, // required
"<DEFAULT>", // default
0, // size (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -15,6 +15,7 @@ databases.updateUrlAttribute(
"", // key
false, // required
"https://example.com", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -14,5 +14,6 @@ val response = databases.updateBooleanAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = false
default = false,
newKey = "" // optional
)
@@ -14,5 +14,6 @@ val response = databases.updateDatetimeAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = ""
default = "",
newKey = "" // optional
)
@@ -14,5 +14,6 @@ val response = databases.updateEmailAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = "email@example.com"
default = "email@example.com",
newKey = "" // optional
)
@@ -15,5 +15,6 @@ val response = databases.updateEnumAttribute(
key = "",
elements = listOf(),
required = false,
default = "<DEFAULT>"
default = "<DEFAULT>",
newKey = "" // optional
)
@@ -16,5 +16,6 @@ val response = databases.updateFloatAttribute(
required = false,
min = 0,
max = 0,
default = 0
default = 0,
newKey = "" // optional
)
@@ -16,5 +16,6 @@ val response = databases.updateIntegerAttribute(
required = false,
min = 0,
max = 0,
default = 0
default = 0,
newKey = "" // optional
)
@@ -14,5 +14,6 @@ val response = databases.updateIpAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = ""
default = "",
newKey = "" // optional
)
@@ -13,5 +13,6 @@ val response = databases.updateRelationshipAttribute(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
key = "",
onDelete = "cascade" // optional
onDelete = "cascade", // optional
newKey = "" // optional
)

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