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
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Change Log

## 20.1.0
## 20.2.0

* Fix doc examples with proper formatting
* Added optional encrypt parameter for database attributes (Text, Longtext, Mediumtext, Varchar) and corresponding column creation methods to enable encryption at rest. Encrypted attributes/columns cannot be queried.
* Updated API docs and code examples to include the new encrypt option (defaulting to false) across databases and TablesDB sections.
* Updated README compatibility note to reflect Appwrite server version 1.8.x.
* Add support for the new `Backups` service

## 20.0.1

* Fix doc examples with proper formatting

## 20.0.0

* Add array-based enum parameters (e.g., `permissions: array<BrowserPermission>`).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**

Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand Down
29 changes: 29 additions & 0 deletions docs/activities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Activities Service


```http request
GET https://cloud.appwrite.io/v1/activities/events
```

** List all events for selected filters. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| queries | string | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc. | [] |


```http request
GET https://cloud.appwrite.io/v1/activities/events/{eventId}
```

** Get event by ID.
**

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| eventId | string | **Required** Event ID. | |

4 changes: 4 additions & 0 deletions docs/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| array | boolean | Is attribute an array? | |
| encrypt | boolean | Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. | |


```http request
Expand Down Expand Up @@ -615,6 +616,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| array | boolean | Is attribute an array? | |
| encrypt | boolean | Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. | |


```http request
Expand Down Expand Up @@ -785,6 +787,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| array | boolean | Is attribute an array? | |
| encrypt | boolean | Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. | |


```http request
Expand Down Expand Up @@ -862,6 +865,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
| required | boolean | Is attribute required? | |
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
| array | boolean | Is attribute an array? | |
| encrypt | boolean | Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. | |


```http request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Health;
use Appwrite\Services\Activities;

$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

$health = new Health($client);
$activities = new Activities($client);

$result = $health->getQueueThreats(
threshold: null // optional
$result = $activities->getEvent(
eventId: '<EVENT_ID>'
);```
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Health;
use Appwrite\Services\Activities;

$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

$health = new Health($client);
$activities = new Activities($client);

$result = $health->getQueuePriorityBuilds(
threshold: null // optional
$result = $activities->listEvents(
queries: '' // optional
);```
3 changes: 2 additions & 1 deletion docs/examples/databases/create-longtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $databases->createLongtextAttribute(
key: '',
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
3 changes: 2 additions & 1 deletion docs/examples/databases/create-mediumtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $databases->createMediumtextAttribute(
key: '',
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
3 changes: 2 additions & 1 deletion docs/examples/databases/create-text-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $databases->createTextAttribute(
key: '',
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
3 changes: 2 additions & 1 deletion docs/examples/databases/create-varchar-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ $result = $databases->createVarcharAttribute(
size: 1,
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
16 changes: 0 additions & 16 deletions docs/examples/health/get-queue-billing-project-aggregation.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/examples/health/get-queue-billing-team-aggregation.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/examples/health/get-queue-region-manager.md

This file was deleted.

3 changes: 2 additions & 1 deletion docs/examples/tablesdb/create-longtext-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $tablesDB->createLongtextColumn(
key: '',
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/create-mediumtext-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $tablesDB->createMediumtextColumn(
key: '',
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/create-text-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ $result = $tablesDB->createTextColumn(
key: '',
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/create-varchar-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ $result = $tablesDB->createVarcharColumn(
size: 1,
required: false,
default: '<DEFAULT>', // optional
array: false // optional
array: false, // optional
encrypt: false // optional
);```
4 changes: 4 additions & 0 deletions docs/tablesdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns
| required | boolean | Is column required? | |
| default | string | Default value for column when not provided. Cannot be set when column is required. | |
| array | boolean | Is column an array? | |
| encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | |


```http request
Expand Down Expand Up @@ -614,6 +615,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns
| required | boolean | Is column required? | |
| default | string | Default value for column when not provided. Cannot be set when column is required. | |
| array | boolean | Is column an array? | |
| encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | |


```http request
Expand Down Expand Up @@ -784,6 +786,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns
| required | boolean | Is column required? | |
| default | string | Default value for column when not provided. Cannot be set when column is required. | |
| array | boolean | Is column an array? | |
| encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | |


```http request
Expand Down Expand Up @@ -861,6 +864,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns
| required | boolean | Is column required? | |
| default | string | Default value for column when not provided. Cannot be set when column is required. | |
| array | boolean | Is column an array? | |
| encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | |


```http request
Expand Down
4 changes: 2 additions & 2 deletions src/Appwrite/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class Client
*/
protected array $headers = [
'content-type' => '',
'user-agent' => 'AppwritePHPSDK/20.1.0 ()',
'user-agent' => 'AppwritePHPSDK/20.2.0 ()',
'x-sdk-name'=> 'PHP',
'x-sdk-platform'=> 'server',
'x-sdk-language'=> 'php',
'x-sdk-version'=> '20.1.0',
'x-sdk-version'=> '20.2.0',
];

/**
Expand Down
Loading