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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 17.5.0

* Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance
* Add `Operator` class for atomic modification of rows via update, bulk update, upsert, and bulk upsert operations
* Add `createResendProvider` and `updateResendProvider` methods to `Messaging` service

## 17.4.1

* Add transaction support for Databases and TablesDB
Expand Down
2 changes: 2 additions & 0 deletions docs/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ GET https://cloud.appwrite.io/v1/account/identities
| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry | [] |
| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 |


```http request
Expand Down Expand Up @@ -84,6 +85,7 @@ GET https://cloud.appwrite.io/v1/account/logs
| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] |
| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 |


```http request
Expand Down
5 changes: 5 additions & 0 deletions docs/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GET https://cloud.appwrite.io/v1/databases
| --- | --- | --- | --- |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name | [] |
| search | string | Search term to filter your list results. Max length: 256 chars. | |
| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 |


```http request
Expand Down Expand Up @@ -166,6 +167,7 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections
| databaseId | string | **Required** Database ID. | |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity | [] |
| search | string | Search term to filter your list results. Max length: 256 chars. | |
| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 |


```http request
Expand Down Expand Up @@ -245,6 +247,7 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. | |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error | [] |
| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 |


```http request
Expand Down Expand Up @@ -787,6 +790,7 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. | [] |
| transactionId | string | Transaction ID to read uncommitted changes within the transaction. | |
| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 |


```http request
Expand Down Expand Up @@ -993,6 +997,7 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error | [] |
| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 |


```http request
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/account/list-identities.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ $client = (new Client())
$account = new Account($client);

$result = $account->listIdentities(
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/account/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ $client = (new Client())
$account = new Account($client);

$result = $account->listLogs(
queries: [] // optional
queries: [], // optional
total: false // optional
);
4 changes: 3 additions & 1 deletion docs/examples/databases/create-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

use Appwrite\Client;
use Appwrite\Services\Databases;
use Appwrite\Permission;
use Appwrite\Role;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -14,7 +16,7 @@ $result = $databases->createCollection(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
name: '<NAME>',
permissions: ["read("any")"], // optional
permissions: [Permission::read(Role::any())], // optional
documentSecurity: false, // optional
enabled: false // optional
);
4 changes: 3 additions & 1 deletion docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

use Appwrite\Client;
use Appwrite\Services\Databases;
use Appwrite\Permission;
use Appwrite\Role;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -21,6 +23,6 @@ $result = $databases->createDocument(
'age' => 30,
'isAdmin' => false
],
permissions: ["read("any")"], // optional
permissions: [Permission::read(Role::any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/list-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ $databases = new Databases($client);
$result = $databases->listAttributes(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/list-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ $databases = new Databases($client);
$result = $databases->listCollections(
databaseId: '<DATABASE_ID>',
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/list-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ $result = $databases->listDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/list-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ $databases = new Databases($client);
$result = $databases->listIndexes(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/databases/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $databases = new Databases($client);

$result = $databases->list(
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
4 changes: 3 additions & 1 deletion docs/examples/databases/update-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

use Appwrite\Client;
use Appwrite\Services\Databases;
use Appwrite\Permission;
use Appwrite\Role;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -14,7 +16,7 @@ $result = $databases->updateCollection(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
name: '<NAME>',
permissions: ["read("any")"], // optional
permissions: [Permission::read(Role::any())], // optional
documentSecurity: false, // optional
enabled: false // optional
);
4 changes: 3 additions & 1 deletion docs/examples/databases/update-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

use Appwrite\Client;
use Appwrite\Services\Databases;
use Appwrite\Permission;
use Appwrite\Role;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -15,6 +17,6 @@ $result = $databases->updateDocument(
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: [], // optional
permissions: ["read("any")"], // optional
permissions: [Permission::read(Role::any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
);
4 changes: 3 additions & 1 deletion docs/examples/databases/upsert-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

use Appwrite\Client;
use Appwrite\Services\Databases;
use Appwrite\Permission;
use Appwrite\Role;

$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -15,6 +17,6 @@ $result = $databases->upsertDocument(
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: [],
permissions: ["read("any")"], // optional
permissions: [Permission::read(Role::any())], // optional
transactionId: '<TRANSACTION_ID>' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/functions/list-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ $functions = new Functions($client);
$result = $functions->listDeployments(
functionId: '<FUNCTION_ID>',
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/functions/list-executions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $functions = new Functions($client);

$result = $functions->listExecutions(
functionId: '<FUNCTION_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/functions/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $functions = new Functions($client);

$result = $functions->list(
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
22 changes: 22 additions & 0 deletions docs/examples/messaging/create-resend-provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Messaging;

$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

$messaging = new Messaging($client);

$result = $messaging->createResendProvider(
providerId: '<PROVIDER_ID>',
name: '<NAME>',
apiKey: '<API_KEY>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: 'email@example.com', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: 'email@example.com', // optional
enabled: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-message-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

$result = $messaging->listMessageLogs(
messageId: '<MESSAGE_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

$result = $messaging->listMessages(
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-provider-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

$result = $messaging->listProviderLogs(
providerId: '<PROVIDER_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

$result = $messaging->listProviders(
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-subscriber-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

$result = $messaging->listSubscriberLogs(
subscriberId: '<SUBSCRIBER_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-subscribers.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ $messaging = new Messaging($client);
$result = $messaging->listSubscribers(
topicId: '<TOPIC_ID>',
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

$result = $messaging->listTargets(
messageId: '<MESSAGE_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-topic-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

$result = $messaging->listTopicLogs(
topicId: '<TOPIC_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/messaging/list-topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $messaging = new Messaging($client);

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

use Appwrite\Client;
use Appwrite\Services\Messaging;

$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

$messaging = new Messaging($client);

$result = $messaging->updateResendProvider(
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
apiKey: '<API_KEY>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: 'email@example.com', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '<REPLY_TO_EMAIL>' // optional
);
3 changes: 2 additions & 1 deletion docs/examples/sites/list-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ $sites = new Sites($client);
$result = $sites->listDeployments(
siteId: '<SITE_ID>',
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
);
3 changes: 2 additions & 1 deletion docs/examples/sites/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $sites = new Sites($client);

$result = $sites->listLogs(
siteId: '<SITE_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
);
Loading