Merge remote-tracking branch 'origin/1.6.x' into fix-deadlock

This commit is contained in:
Jake Barnby 2024-09-02 18:35:50 +12:00
commit 98dee5f70d
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
11 changed files with 69 additions and 7 deletions

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

View file

@ -11,6 +11,7 @@ use Appwrite\Event\Validator\FunctionEvent;
use Appwrite\Extend\Exception;
use Appwrite\Extend\Exception as AppwriteException;
use Appwrite\Functions\Validator\Headers;
use Appwrite\Functions\Validator\Payload;
use Appwrite\Functions\Validator\RuntimeSpecification;
use Appwrite\Messaging\Adapter\Realtime;
use Appwrite\Platform\Tasks\ScheduleExecutions;
@ -1715,7 +1716,7 @@ App::post('/v1/functions/:functionId/executions')
->label('sdk.response.model', Response::MODEL_EXECUTION)
->label('sdk.request.type', Response::CONTENT_TYPE_JSON)
->param('functionId', '', new UID(), 'Function ID.')
->param('body', '', new Text(10485760, 0), 'HTTP body of execution. Default value is empty string.', true)
->param('body', '', new Payload(10485760, 0), 'HTTP body of execution. Default value is empty string.', true)
->param('async', false, new Boolean(), 'Execute code in the background. Default value is false.', true)
->param('path', '/', new Text(2048), 'HTTP path of execution. Path can include query params. Default value is /', true)
->param('method', 'POST', new Whitelist(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], true), 'HTTP method of execution. Default value is GET.', true)

View file

@ -1,3 +1,28 @@
## 12.0.0
* Support for Appwrite 1.6
* Added `key` attribute to `Runtime` response model.
* Added `buildSize` attribute to `Deployments` response model.
* Added `scheduledAt` attribute to `Executions` response model.
* Added `scopes` attribute to `Functions` response model.
* Added `specifications` attribute to `Functions` response model.
* Added new response model for `Specifications`.
* Added new response model for `Builds`.
* Added `createJWT()` : Enables creating a JWT using the `userId`.
* Added `listSpecifications()`: Enables listing available runtime specifications.
* Added `deleteExecution()` : Enables deleting executions.
* Added `updateDeploymentBuild()`: Enables cancelling a deployment.
* Added `scheduledAt` parameter to `createExecution()`: Enables creating a delayed execution
* Breaking changes:
* Removed `otp` parameter from `deleteMFAAuthenticator`.
* Added `scopes` parameter for create/update function.
* Renamed `templateBranch` to `templateVersion` in `createFunction()`.
* Renamed `downloadDeployment()` to `getDeploymentDownload()`
You can find the new syntax for breaking changes in the [Appwrite API references](https://appwrite.io/docs/references). Select version `1.6.x`.
**Please note: This version is compatible with Appwrite 1.6 and later only. If you do not update your Appwrite SDK, old SDKs will not break your app. Appwrite APIs are backwards compatible.**
## 11.0.3
* Minor bugfixes

View file

@ -1,3 +1,17 @@
## 13.0.0
* Fixed realtime reconnection issues
* Support for Appwrite 1.6
* Update dependencies
* Added `scheduledAt` attribute to `Execution` response model
* Added `scheduledAt` parameter to `createExecution()`: Enables creating a delayed execution
* Breaking changes:
* Removed `otp` parameter from `deleteMFAAuthenticator`.
You can find the new syntax for breaking changes in the [Appwrite API references](https://appwrite.io/docs/references). Select version `1.6.x`.
**Please note: This version is compatible with Appwrite 1.6 and later only. If you do not update your Appwrite SDK, old SDKs will not break your app. Appwrite APIs are backwards compatible.**
## 12.0.4
* Fixed concurrent modification error when closing realtime socket

View file

@ -0,0 +1,18 @@
<?php
namespace Appwrite\Functions\Validator;
use Utopia\Validator\Text;
class Payload extends Text
{
public function __construct(int $length, int $min = 1)
{
parent::__construct($length, $min);
}
public function getType(): string
{
return self::TYPE_STRING;
}
}

View file

@ -344,6 +344,10 @@ class Swagger2 extends Format
$consumes = ['multipart/form-data'];
$node['type'] = 'file';
break;
case 'Appwrite\Functions\Validator\Payload':
$consumes = ['multipart/form-data'];
$node['type'] = 'payload';
break;
case 'Appwrite\Utopia\Database\Validator\Queries\Attributes':
case 'Appwrite\Utopia\Database\Validator\Queries\Buckets':
case 'Appwrite\Utopia\Database\Validator\Queries\Collections':