Skip to content

Commit e946bb6

Browse files
authored
Merge pull request #61 from appwrite/dev
feat: PHP SDK update for version 20.2.0
2 parents e8c76cb + 71b67b4 commit e946bb6

27 files changed

Lines changed: 658 additions & 77 deletions

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# Change Log
22

3-
## 20.1.0
3+
## 20.2.0
44

5-
* Fix doc examples with proper formatting
5+
* 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.
6+
* Updated API docs and code examples to include the new encrypt option (defaulting to false) across databases and TablesDB sections.
7+
* Updated README compatibility note to reflect Appwrite server version 1.8.x.
68
* Add support for the new `Backups` service
79

10+
## 20.0.1
11+
12+
* Fix doc examples with proper formatting
13+
814
## 20.0.0
915

1016
* Add array-based enum parameters (e.g., `permissions: array<BrowserPermission>`).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

9-
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
9+
**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).**
1010

1111
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)
1212

docs/activities.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Activities Service
2+
3+
4+
```http request
5+
GET https://cloud.appwrite.io/v1/activities/events
6+
```
7+
8+
** List all events for selected filters. **
9+
10+
### Parameters
11+
12+
| Field Name | Type | Description | Default |
13+
| --- | --- | --- | --- |
14+
| 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. | [] |
15+
16+
17+
```http request
18+
GET https://cloud.appwrite.io/v1/activities/events/{eventId}
19+
```
20+
21+
** Get event by ID.
22+
**
23+
24+
### Parameters
25+
26+
| Field Name | Type | Description | Default |
27+
| --- | --- | --- | --- |
28+
| eventId | string | **Required** Event ID. | |
29+

docs/databases.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
577577
| required | boolean | Is attribute required? | |
578578
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
579579
| array | boolean | Is attribute an array? | |
580+
| 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. | |
580581

581582

582583
```http request
@@ -615,6 +616,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
615616
| required | boolean | Is attribute required? | |
616617
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
617618
| array | boolean | Is attribute an array? | |
619+
| 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. | |
618620

619621

620622
```http request
@@ -785,6 +787,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
785787
| required | boolean | Is attribute required? | |
786788
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
787789
| array | boolean | Is attribute an array? | |
790+
| 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. | |
788791

789792

790793
```http request
@@ -862,6 +865,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
862865
| required | boolean | Is attribute required? | |
863866
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
864867
| array | boolean | Is attribute an array? | |
868+
| 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. | |
865869

866870

867871
```http request
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<?php
33

44
use Appwrite\Client;
5-
use Appwrite\Services\Health;
5+
use Appwrite\Services\Activities;
66

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

12-
$health = new Health($client);
12+
$activities = new Activities($client);
1313

14-
$result = $health->getQueueThreats(
15-
threshold: null // optional
14+
$result = $activities->getEvent(
15+
eventId: '<EVENT_ID>'
1616
);```

docs/examples/health/get-queue-priority-builds.md renamed to docs/examples/activities/list-events.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<?php
33

44
use Appwrite\Client;
5-
use Appwrite\Services\Health;
5+
use Appwrite\Services\Activities;
66

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

12-
$health = new Health($client);
12+
$activities = new Activities($client);
1313

14-
$result = $health->getQueuePriorityBuilds(
15-
threshold: null // optional
14+
$result = $activities->listEvents(
15+
queries: '' // optional
1616
);```

docs/examples/databases/create-longtext-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ $result = $databases->createLongtextAttribute(
1717
key: '',
1818
required: false,
1919
default: '<DEFAULT>', // optional
20-
array: false // optional
20+
array: false, // optional
21+
encrypt: false // optional
2122
);```

docs/examples/databases/create-mediumtext-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ $result = $databases->createMediumtextAttribute(
1717
key: '',
1818
required: false,
1919
default: '<DEFAULT>', // optional
20-
array: false // optional
20+
array: false, // optional
21+
encrypt: false // optional
2122
);```

docs/examples/databases/create-text-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ $result = $databases->createTextAttribute(
1717
key: '',
1818
required: false,
1919
default: '<DEFAULT>', // optional
20-
array: false // optional
20+
array: false, // optional
21+
encrypt: false // optional
2122
);```

docs/examples/databases/create-varchar-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ $result = $databases->createVarcharAttribute(
1818
size: 1,
1919
required: false,
2020
default: '<DEFAULT>', // optional
21-
array: false // optional
21+
array: false, // optional
22+
encrypt: false // optional
2223
);```

0 commit comments

Comments
 (0)