Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Change Log

## 24.1.0

* Added `sizeActual` property to `File` model for actual stored size after compression/encryption
* Updated `BillingLimits` properties to be nullable to match the server's sparse "limits crossed" response
* Updated `Project.billingLimits` to be nullable
* Updated advisor example docs to use API key authentication
* Removed orphaned `Prompt` enum (already unused; superseded by `ProjectOAuth2GooglePrompt` in 24.0.0)
## 25.0.0

* Breaking: Removed `githubImagine` and `googleImagine` from `ProjectOAuthProviderId`
* Breaking: Removed `deno-1.21`, `deno-1.24`, and `deno-1.35` from `Runtime` and `BuildRuntime`
* Breaking: Dropped numeric suffixes from `StatusCode` redirect members
* Added: `Organization` service for managing projects and API keys
* Added: `PolicyDenyAliasedEmail`, `PolicyDenyDisposableEmail`, and `PolicyDenyFreeEmail` policy models
* Added: `deny-aliased-email`, `deny-disposable-email`, and `deny-free-email` to `ProjectPolicyId`
* Added: `BrowserTheme`, `HealthQueueName`, `OrganizationKeyScopes`, and `Region` enums
* Added: `dart-3.12` and `flutter-3.44` runtimes
* Added: `ProjectList` model and new attributes on `Function`, `Site`, and `UsageGauge`
* Updated: `functions`, `sites`, `usage`, `health`, and `avatars` services
* Updated: Renamed `updatePresence` to `update` in the `presences` service

## 24.0.0

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^10",
"phpunit/phpunit": "^12",
"mockery/mockery": "1.6.12"
},
"prefer-stable": true,
"minimum-stability": "dev"
}
6 changes: 3 additions & 3 deletions docs/examples/avatars/get-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Appwrite\Client;
use Appwrite\Services\Avatars;
use Appwrite\Enums\Theme;
use Appwrite\Enums\BrowserTheme;
use Appwrite\Enums\Timezone;
use Appwrite\Enums\BrowserPermission;
use Appwrite\Enums\ImageFormat;
Expand All @@ -24,11 +24,11 @@ $result = $avatars->getScreenshot(
viewportWidth: 1920, // optional
viewportHeight: 1080, // optional
scale: 2, // optional
theme: Theme::DARK(), // optional
theme: BrowserTheme::DARK(), // optional
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
fullpage: true, // optional
locale: 'en-US', // optional
timezone: Timezone::AMERICANEWYORK(), // optional
timezone: Timezone::AFRICAABIDJAN(), // optional
latitude: 37.7749, // optional
longitude: -122.4194, // optional
accuracy: 100, // optional
Expand Down
6 changes: 4 additions & 2 deletions docs/examples/functions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Appwrite\Client;
use Appwrite\Services\Functions;
use Appwrite\Enums\Runtime;
use Appwrite\Enums\Scopes;
use Appwrite\Enums\ProjectKeyScopes;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -25,12 +25,14 @@ $result = $functions->create(
logging: false, // optional
entrypoint: '<ENTRYPOINT>', // optional
commands: '<COMMANDS>', // optional
scopes: [Scopes::PROJECTREAD()], // optional
scopes: [ProjectKeyScopes::PROJECTREAD()], // optional
installationId: '<INSTALLATION_ID>', // optional
providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional
providerBranch: '<PROVIDER_BRANCH>', // optional
providerSilentMode: false, // optional
providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
providerBranches: [], // optional
providerPaths: [], // optional
buildSpecification: '', // optional
runtimeSpecification: '', // optional
deploymentRetention: 0 // optional
Expand Down
6 changes: 4 additions & 2 deletions docs/examples/functions/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Appwrite\Client;
use Appwrite\Services\Functions;
use Appwrite\Enums\Runtime;
use Appwrite\Enums\Scopes;
use Appwrite\Enums\ProjectKeyScopes;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -25,12 +25,14 @@ $result = $functions->update(
logging: false, // optional
entrypoint: '<ENTRYPOINT>', // optional
commands: '<COMMANDS>', // optional
scopes: [Scopes::PROJECTREAD()], // optional
scopes: [ProjectKeyScopes::PROJECTREAD()], // optional
installationId: '<INSTALLATION_ID>', // optional
providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional
providerBranch: '<PROVIDER_BRANCH>', // optional
providerSilentMode: false, // optional
providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
providerBranches: [], // optional
providerPaths: [], // optional
buildSpecification: '', // optional
runtimeSpecification: '', // optional
deploymentRetention: 0 // optional
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/health/get-failed-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Appwrite\Client;
use Appwrite\Services\Health;
use Appwrite\Enums\Name;
use Appwrite\Enums\HealthQueueName;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -13,6 +13,6 @@ $client = (new Client())
$health = new Health($client);

$result = $health->getFailedJobs(
name: Name::V1DATABASE(),
name: HealthQueueName::V1DATABASE(),
threshold: null // optional
);```
20 changes: 20 additions & 0 deletions docs/examples/organization/create-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;
use Appwrite\Enums\OrganizationKeyScopes;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->createKey(
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [OrganizationKeyScopes::PROJECTSREAD()],
expire: '2020-10-15T06:38:00.000+00:00' // optional
);```
19 changes: 19 additions & 0 deletions docs/examples/organization/create-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;
use Appwrite\Enums\Region;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->createProject(
projectId: '',
name: '<NAME>',
region: Region::FRA() // optional
);```
16 changes: 16 additions & 0 deletions docs/examples/organization/delete-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->deleteKey(
keyId: '<KEY_ID>'
);```
16 changes: 16 additions & 0 deletions docs/examples/organization/delete-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->deleteProject(
projectId: '<PROJECT_ID>'
);```
16 changes: 16 additions & 0 deletions docs/examples/organization/get-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->getKey(
keyId: '<KEY_ID>'
);```
16 changes: 16 additions & 0 deletions docs/examples/organization/get-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->getProject(
projectId: '<PROJECT_ID>'
);```
17 changes: 17 additions & 0 deletions docs/examples/organization/list-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->listKeys(
queries: [], // optional
total: false // optional
);```
18 changes: 18 additions & 0 deletions docs/examples/organization/list-projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->listProjects(
queries: [], // optional
search: '<SEARCH>', // optional
total: false // optional
);```
20 changes: 20 additions & 0 deletions docs/examples/organization/update-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;
use Appwrite\Enums\OrganizationKeyScopes;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->updateKey(
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [OrganizationKeyScopes::PROJECTSREAD()],
expire: '2020-10-15T06:38:00.000+00:00' // optional
);```
17 changes: 17 additions & 0 deletions docs/examples/organization/update-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Organization;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key

$organization = new Organization($client);

$result = $organization->updateProject(
projectId: '<PROJECT_ID>',
name: '<NAME>'
);```
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $client = (new Client())

$presences = new Presences($client);

$result = $presences->updatePresence(
$result = $presences->update(
presenceId: '<PRESENCE_ID>',
userId: '<USER_ID>',
status: '<STATUS>', // optional
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/proxy/create-redirect-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $proxy = new Proxy($client);
$result = $proxy->createRedirectRule(
domain: '',
url: 'https://example.com',
statusCode: StatusCode::MOVEDPERMANENTLY301(),
statusCode: StatusCode::MOVEDPERMANENTLY(),
resourceId: '<RESOURCE_ID>',
resourceType: ProxyResourceType::SITE()
);```
2 changes: 2 additions & 0 deletions docs/examples/sites/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ $result = $sites->create(
providerBranch: '<PROVIDER_BRANCH>', // optional
providerSilentMode: false, // optional
providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
providerBranches: [], // optional
providerPaths: [], // optional
buildSpecification: '', // optional
runtimeSpecification: '', // optional
deploymentRetention: 0 // optional
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/sites/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ $result = $sites->update(
providerBranch: '<PROVIDER_BRANCH>', // optional
providerSilentMode: false, // optional
providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
providerBranches: [], // optional
providerPaths: [], // optional
buildSpecification: '', // optional
runtimeSpecification: '', // optional
deploymentRetention: 0 // optional
Expand Down
4 changes: 4 additions & 0 deletions docs/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ POST https://cloud.appwrite.io/v1/functions
| providerBranch | string | Production branch for the repo linked to the function. | |
| providerSilentMode | boolean | Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests. | |
| providerRootDirectory | string | Path to function code in the linked repo. | |
| providerBranches | array | List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches. | [] |
| providerPaths | array | List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes. | [] |
| buildSpecification | string | Build specification for the function deployments. | [] |
| runtimeSpecification | string | Runtime specification for the function executions. | [] |
| deploymentRetention | integer | Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. | 0 |
Expand Down Expand Up @@ -102,6 +104,8 @@ PUT https://cloud.appwrite.io/v1/functions/{functionId}
| providerBranch | string | Production branch for the repo linked to the function | |
| providerSilentMode | boolean | Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests. | |
| providerRootDirectory | string | Path to function code in the linked repo. | |
| providerBranches | array | List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches. | |
| providerPaths | array | List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes. | |
| buildSpecification | string | Build specification for the function deployments. | [] |
| runtimeSpecification | string | Runtime specification for the function executions. | [] |
| deploymentRetention | integer | Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. | 0 |
Expand Down
Loading