1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00

Merge branch '1.5.x' of https://github.com/appwrite/appwrite into feat-improve-header-demo-values

This commit is contained in:
loks0n 2024-05-24 11:16:54 +01:00
commit 6eae908e5e
68 changed files with 194 additions and 140 deletions

2
.gitmodules vendored
View file

@ -1,4 +1,4 @@
[submodule "app/console"]
path = app/console
url = https://github.com/appwrite/console
branch = 4.3.0
branch = 4.3.2

View file

@ -1,3 +1,39 @@
# Version 1.5.6
## What's Changed
### Notable Changes
* Prevent functions domain to be used as custom domain in [#7934](https://github.com/appwrite/appwrite/pull/7934)
### Fixes
* Fix auth mode check in [#7980](https://github.com/appwrite/appwrite/pull/7980)
* Fix templates not copying hidden files in [#7610](https://github.com/appwrite/appwrite/pull/7610)
* Use `resourceInternalId` for Querying Function Deployments in [#8038](https://github.com/appwrite/appwrite/pull/8038)
* Fix Email OTP not verifying account in [#8084](https://github.com/appwrite/appwrite/pull/8084)
* Fix MFA email verification code font in [#8082](https://github.com/appwrite/appwrite/pull/8082)
* Don't kick user and require verification after enabling MFA in [#8081](https://github.com/appwrite/appwrite/pull/8081)
* Fix typo in credit-cards.php credit card image filename in [#8074](https://github.com/appwrite/appwrite/pull/8074)
* Fix Deprecated Warning in Doctor.php in [#8105](https://github.com/appwrite/appwrite/pull/8105)
* Set limit to retrieve all stats for the usage range in [#8117](https://github.com/appwrite/appwrite/pull/8117)
* Fix email used for name when user is created via Apple OAuth2 in [#8102](https://github.com/appwrite/appwrite/pull/8102)
### Miscellaneous
* Add GitHub action to close stale issues in [#7927](https://github.com/appwrite/appwrite/pull/7927)
* Document the standard we follow for country codes in [#8014](https://github.com/appwrite/appwrite/pull/8014)
* Add OSV Scanner for vulnerability scans in [#6506](https://github.com/appwrite/appwrite/pull/6506)
* Fix stale action close reason in [#8046](https://github.com/appwrite/appwrite/pull/8046)
* Add OSV Scanner for vulnerability scans in [#8021](https://github.com/appwrite/appwrite/pull/8021)
* Fix some typos in comments in [#7993](https://github.com/appwrite/appwrite/pull/7993)
* Replace missing domain paths in README.md in [#8049](https://github.com/appwrite/appwrite/pull/8049)
* Add the React Native SDK in [#7776](https://github.com/appwrite/appwrite/pull/7776)
* Bump database in [#8080](https://github.com/appwrite/appwrite/pull/8080)
* Add documentation for metrics in [#8088](https://github.com/appwrite/appwrite/pull/8088)
* Add new country Palestine with its translations in [#8031](https://github.com/appwrite/appwrite/pull/8031)
* Update users create token description in [#8129](https://github.com/appwrite/appwrite/pull/8129)
* Bump dependencies in [#8130](https://github.com/appwrite/appwrite/pull/8130)
# Version 1.5.5
## What's Changed
### Notable changes

View file

@ -67,7 +67,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.5.5
appwrite/appwrite:1.5.6
```
### Windows
@ -79,7 +79,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.5.5
appwrite/appwrite:1.5.6
```
#### PowerShell
@ -89,7 +89,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.5.5
appwrite/appwrite:1.5.6
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。

View file

@ -75,7 +75,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.5.5
appwrite/appwrite:1.5.6
```
### Windows
@ -87,7 +87,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.5.5
appwrite/appwrite:1.5.6
```
#### PowerShell
@ -97,7 +97,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.5.5
appwrite/appwrite:1.5.6
```
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.

View file

@ -15,7 +15,7 @@ return [
[
'key' => 'web',
'name' => 'Web',
'version' => '14.0.0',
'version' => '14.0.2',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
@ -63,7 +63,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '12.0.3',
'version' => '12.0.4',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@ -81,7 +81,7 @@ return [
[
'key' => 'apple',
'name' => 'Apple',
'version' => '5.0.0',
'version' => '6.0.0',
'url' => 'https://github.com/appwrite/sdk-for-apple',
'package' => 'https://github.com/appwrite/sdk-for-apple',
'enabled' => true,
@ -116,7 +116,7 @@ return [
[
'key' => 'android',
'name' => 'Android',
'version' => '5.0.0',
'version' => '5.1.1',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
@ -138,7 +138,7 @@ return [
[
'key' => 'react-native',
'name' => 'React Native',
'version' => '0.3.0',
'version' => '0.3.2',
'url' => 'https://github.com/appwrite/sdk-for-react-native',
'package' => 'https://npmjs.com/package/react-native-appwrite',
'enabled' => true,
@ -203,7 +203,7 @@ return [
[
'key' => 'web',
'name' => 'Console',
'version' => '0.6.1',
'version' => '0.6.3',
'url' => 'https://github.com/appwrite/sdk-for-console',
'package' => '',
'enabled' => true,
@ -221,7 +221,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '5.0.2',
'version' => '5.0.5',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
@ -249,7 +249,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '12.0.1',
'version' => '13.0.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' => '10.0.1',
'version' => '10.0.2',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@ -285,7 +285,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '11.0.1',
'version' => '11.0.2',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@ -303,7 +303,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '5.0.2',
'version' => '5.0.3',
'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' => '11.0.1',
'version' => '11.0.2',
'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' => '4.0.0',
'version' => '4.0.1',
'url' => 'https://github.com/appwrite/sdk-for-go',
'package' => '',
'enabled' => false,
@ -357,7 +357,7 @@ return [
[
'key' => 'java',
'name' => 'Java',
'version' => '4.0.1',
'version' => '4.0.2',
'url' => 'https://github.com/appwrite/sdk-for-java',
'package' => '',
'enabled' => false,
@ -375,7 +375,7 @@ return [
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.8.1',
'version' => '0.8.2',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
@ -393,7 +393,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '11.0.2',
'version' => '11.0.3',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@ -411,7 +411,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '5.0.1',
'version' => '5.0.2',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@ -433,7 +433,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '5.0.1',
'version' => '5.0.2',
'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

@ -1 +1 @@
Subproject commit 0af1af4852bfe4d9b234c74524b3f7592094e85f
Subproject commit d75187458097a20b9e693079b16cb3f25933d31c

View file

@ -1753,9 +1753,6 @@ App::post('/v1/functions/:functionId/executions')
Console::error($th->getMessage());
if ($th instanceof AppwriteException) {
if ($function->getAttribute('logging')) {
Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
throw $th;
}
} finally {
@ -1765,11 +1762,11 @@ App::post('/v1/functions/:functionId/executions')
->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000)) // per project
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) // per function
;
}
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
}
$roles = Authorization::getRoles();

View file

@ -300,9 +300,6 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
Console::error($th->getMessage());
if ($th instanceof AppwriteException) {
if ($function->getAttribute('logging')) {
Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
throw $th;
}
} finally {
@ -312,11 +309,11 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000)) // per project
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) // per function
;
}
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
}
$execution->setAttribute('logs', '');

View file

@ -112,8 +112,8 @@ const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return
const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 430;
const APP_VERSION_STABLE = '1.5.5';
const APP_CACHE_BUSTER = 432;
const APP_VERSION_STABLE = '1.5.6';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';

24
composer.lock generated
View file

@ -1556,16 +1556,16 @@
},
{
"name": "utopia-php/database",
"version": "0.49.9",
"version": "0.49.10",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "ee93c14b99820f791c669648854f094fe399a085"
"reference": "216209121bc97a2010f67a39c561fafe1e936bec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/ee93c14b99820f791c669648854f094fe399a085",
"reference": "ee93c14b99820f791c669648854f094fe399a085",
"url": "https://api.github.com/repos/utopia-php/database/zipball/216209121bc97a2010f67a39c561fafe1e936bec",
"reference": "216209121bc97a2010f67a39c561fafe1e936bec",
"shasum": ""
},
"require": {
@ -1606,9 +1606,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.49.9"
"source": "https://github.com/utopia-php/database/tree/0.49.10"
},
"time": "2024-05-12T23:58:34+00:00"
"time": "2024-05-20T02:14:20+00:00"
},
{
"name": "utopia-php/domains",
@ -2730,16 +2730,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.38.5",
"version": "0.38.6",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "830a46cc8e34ee096a76d4af6f00adf008a7cbf8"
"reference": "d7016d6d72545e84709892faca972eb4bf5bd699"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/830a46cc8e34ee096a76d4af6f00adf008a7cbf8",
"reference": "830a46cc8e34ee096a76d4af6f00adf008a7cbf8",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d7016d6d72545e84709892faca972eb4bf5bd699",
"reference": "d7016d6d72545e84709892faca972eb4bf5bd699",
"shasum": ""
},
"require": {
@ -2775,9 +2775,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.38.5"
"source": "https://github.com/appwrite/sdk-generator/tree/0.38.6"
},
"time": "2024-05-17T00:59:59+00:00"
"time": "2024-05-20T18:00:16+00:00"
},
{
"name": "doctrine/deprecations",

View file

@ -7,7 +7,7 @@ let client = Client()
let account = Account(client)
let user = try await account.deleteMfaAuthenticator(
let result = try await account.deleteMfaAuthenticator(
type: .totp,
otp: "<OTP>"
)

View file

@ -2,6 +2,7 @@ mutation {
accountCreateAnonymousSession {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -3,35 +3,6 @@ mutation {
type: "totp",
otp: "<OTP>"
) {
_id
_createdAt
_updatedAt
name
password
hash
hashOptions
registration
status
labels
passwordUpdate
email
phone
emailVerification
phoneVerification
mfa
prefs {
data
}
targets {
_id
_createdAt
_updatedAt
name
userId
providerId
providerType
identifier
}
accessedAt
}
}

View file

@ -4,6 +4,7 @@ query {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -3,5 +3,6 @@ query {
totp
phone
email
recoveryCode
}
}

View file

@ -4,6 +4,7 @@ query {
sessions {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -4,6 +4,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -10,3 +10,4 @@ appwrite messaging updateEmail \

View file

@ -17,7 +17,8 @@ const result = await messaging.updateEmail(
false, // html (optional)
[], // cc (optional)
[], // bcc (optional)
'' // scheduledAt (optional)
'', // scheduledAt (optional)
[] // attachments (optional)
);
console.log(response);

View file

@ -19,4 +19,5 @@ Message result = await messaging.updateEmail(
cc: [], // (optional)
bcc: [], // (optional)
scheduledAt: '', // (optional)
attachments: [], // (optional)
);

View file

@ -18,5 +18,6 @@ const response = await messaging.updateEmail(
false, // html (optional)
[], // cc (optional)
[], // bcc (optional)
'' // scheduledAt (optional)
'', // scheduledAt (optional)
[] // attachments (optional)
);

View file

@ -20,5 +20,6 @@ Message result = await messaging.UpdateEmail(
html: false, // optional
cc: new List<string>(), // optional
bcc: new List<string>(), // optional
scheduledAt: "" // optional
scheduledAt: "", // optional
attachments: new List<string>() // optional
);

View file

@ -2,6 +2,7 @@ mutation {
accountCreateAnonymousSession {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -3,35 +3,6 @@ mutation {
type: "totp",
otp: "<OTP>"
) {
_id
_createdAt
_updatedAt
name
password
hash
hashOptions
registration
status
labels
passwordUpdate
email
phone
emailVerification
phoneVerification
mfa
prefs {
data
}
targets {
_id
_createdAt
_updatedAt
name
userId
providerId
providerType
identifier
}
accessedAt
}
}

View file

@ -4,6 +4,7 @@ query {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -3,5 +3,6 @@ query {
totp
phone
email
recoveryCode
}
}

View file

@ -4,6 +4,7 @@ query {
sessions {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -4,6 +4,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -10,7 +10,8 @@ mutation {
html: false,
cc: [],
bcc: [],
scheduledAt: ""
scheduledAt: "",
attachments: []
) {
_id
_createdAt

View file

@ -4,6 +4,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -5,5 +5,6 @@ query {
totp
phone
email
recoveryCode
}
}

View file

@ -6,6 +6,7 @@ query {
sessions {
_id
_createdAt
_updatedAt
userId
expire
provider

View file

@ -21,6 +21,7 @@ messaging.updateEmail(
listOf(), // cc (optional)
listOf(), // bcc (optional)
"", // scheduledAt (optional)
listOf(), // attachments (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();

View file

@ -20,5 +20,6 @@ val response = messaging.updateEmail(
html = false, // optional
cc = listOf(), // optional
bcc = listOf(), // optional
scheduledAt = "" // optional
scheduledAt = "", // optional
attachments = listOf() // optional
)

View file

@ -10,7 +10,7 @@ const functions = new sdk.Functions(client);
const result = await functions.createDeployment(
'<FUNCTION_ID>', // functionId
InputFile.fromPath('/path/to/file.png', 'file.png'), // code
InputFile.fromPath('/path/to/file', 'filename'), // code
false, // activate
'<ENTRYPOINT>', // entrypoint (optional)
'<COMMANDS>' // commands (optional)

View file

@ -18,5 +18,6 @@ const result = await messaging.updateEmail(
false, // html (optional)
[], // cc (optional)
[], // bcc (optional)
'' // scheduledAt (optional)
'', // scheduledAt (optional)
[] // attachments (optional)
);

View file

@ -11,6 +11,6 @@ const storage = new sdk.Storage(client);
const result = await storage.createFile(
'<BUCKET_ID>', // bucketId
'<FILE_ID>', // fileId
InputFile.fromPath('/path/to/file.png', 'file.png'), // file
InputFile.fromPath('/path/to/file', 'filename'), // file
["read("any")"] // permissions (optional)
);

View file

@ -21,5 +21,6 @@ $result = $messaging->updateEmail(
html: false, // optional
cc: [], // optional
bcc: [], // optional
scheduledAt: '' // optional
scheduledAt: '', // optional
attachments: [] // optional
);

View file

@ -18,5 +18,6 @@ result = messaging.update_email(
html = False, # optional
cc = [], # optional
bcc = [], # optional
scheduled_at = '' # optional
scheduled_at = '', # optional
attachments = [] # optional
)

View file

@ -15,5 +15,6 @@ X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2
"html": false,
"cc": [],
"bcc": [],
"scheduledAt":
"scheduledAt": ,
"attachments": []
}

View file

@ -20,5 +20,6 @@ result = messaging.update_email(
html: false, # optional
cc: [], # optional
bcc: [], # optional
scheduled_at: '' # optional
scheduled_at: '', # optional
attachments: [] # optional
)

View file

@ -8,7 +8,7 @@ let client = Client()
let account = Account(client)
let user = try await account.deleteMfaAuthenticator(
let result = try await account.deleteMfaAuthenticator(
type: .totp,
otp: "<OTP>"
)

View file

@ -18,6 +18,7 @@ let message = try await messaging.updateEmail(
html: false, // optional
cc: [], // optional
bcc: [], // optional
scheduledAt: "" // optional
scheduledAt: "", // optional
attachments: [] // optional
)

View file

@ -1,3 +1,7 @@
## 11.0.3
* Minor bugfixes
## 11.0.2
* Fixed MSG91 missing template ID

View file

@ -1,3 +1,7 @@
## 12.0.4
* Fixed concurrent modification error when closing realtime socket
## 12.0.3
* Upgrade dependencies

View file

@ -84,6 +84,7 @@ abstract class Migration
'1.5.3' => 'V20',
'1.5.4' => 'V20',
'1.5.5' => 'V20',
'1.5.6' => 'V20',
];
/**

View file

@ -61,7 +61,7 @@ class FunctionsCustomClientTest extends Scope
'users.*.create',
'users.*.delete',
],
'schedule' => '0 0 1 1 *',
'schedule' => '* * * * *', // execute every minute
'timeout' => 10,
]);
@ -163,6 +163,24 @@ class FunctionsCustomClientTest extends Scope
$this->assertEquals(202, $execution['headers']['status-code']);
// Wait for the first scheduled execution to be created
sleep(65);
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/executions', [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey'],
]);
$this->assertEquals(200, $executions['headers']['status-code']);
$this->assertCount(2, $executions['body']['executions']);
$this->assertIsArray($executions['body']['executions']);
$this->assertEquals($executions['body']['executions'][1]['trigger'], 'schedule');
$this->assertEquals($executions['body']['executions'][1]['status'], 'completed');
$this->assertEquals($executions['body']['executions'][1]['responseStatusCode'], 200);
$this->assertEquals($executions['body']['executions'][1]['responseBody'], '');
$this->assertEquals($executions['body']['executions'][1]['logs'], '');
// Cleanup : Delete function
$response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $function['body']['$id'], [
'content-type' => 'application/json',

View file

@ -914,12 +914,14 @@ class FunctionsCustomServerTest extends Scope
'runtime' => $name,
'entrypoint' => $entrypoint,
'events' => [],
'schedule' => '* * * * *', // execute every minute
'timeout' => $timeout,
]);
$functionId = $function['body']['$id'] ?? '';
$this->assertEquals(201, $function['headers']['status-code']);
$this->assertEquals('* * * * *', $function['body']['schedule']);
$deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([
'content-type' => 'multipart/form-data',
@ -986,6 +988,24 @@ class FunctionsCustomServerTest extends Scope
$this->assertEquals($executions['body']['executions'][0]['logs'], '');
$this->assertStringContainsString('timed out', $executions['body']['executions'][0]['errors']);
sleep(70); //wait for scheduled execution to be created and time out
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
$this->assertEquals(200, $executions['headers']['status-code']);
$this->assertCount(2, $executions['body']['executions']);
$this->assertIsArray($executions['body']['executions']);
$this->assertEquals($executions['body']['executions'][1]['trigger'], 'schedule');
$this->assertEquals($executions['body']['executions'][1]['status'], 'failed');
$this->assertEquals($executions['body']['executions'][1]['responseStatusCode'], 500);
$this->assertLessThan(20, $executions['body']['executions'][1]['duration']);
$this->assertEquals($executions['body']['executions'][1]['responseBody'], '');
$this->assertEquals($executions['body']['executions'][1]['logs'], '');
$this->assertStringContainsString('timed out', $executions['body']['executions'][1]['errors']);
// Cleanup : Delete function
$response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [
'content-type' => 'application/json',