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

## 23.0.0

* [BREAKING] Renamed Webhook model fields: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`, `signatureKey` → `secret`
* [BREAKING] Renamed Webhook service parameters to match: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`
* [BREAKING] Renamed `Webhooks.updateSignature()` to `Webhooks.updateSecret()` with new optional `secret` parameter
* Added `Client.getHeaders()` method to retrieve request headers
* Added `secret` parameter to Webhook create and update methods
* Added `x` OAuth provider to `OAuthProvider` enum
* Added `userType` field to `Log` model
* Added `purge` parameter to `updateCollection` and `updateTable` for cache invalidation
* Added Project service: platform CRUD, key CRUD, protocol/service status management
* Added new models: `Key`, `KeyList`, `Project`, `DevKey`, `MockNumber`, `AuthProvider`, `PlatformAndroid`, `PlatformApple`, `PlatformLinux`, `PlatformList`, `PlatformWeb`, `PlatformWindows`, `BillingLimits`, `Block`
* Added new enums: `PlatformType`, `ProtocolId`, `ServiceId`
* Updated `BuildRuntime`, `Runtime` enums with `dart-3.11` and `flutter-3.41`
* Updated `Scopes` enum with `keysRead`, `keysWrite`, `platformsRead`, `platformsWrite`
* Updated `X-Appwrite-Response-Format` header to `1.9.1`
* Updated TTL description for list caching in Databases and TablesDB

## 22.0.0

* [BREAKING] Changed `$sequence` type from `int` to `String` for `Row` and `Document` models
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:

```yml
dependencies:
dart_appwrite: ^22.0.0
dart_appwrite: ^23.0.0
```

You can install packages from the command line:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AttributeDatetime result = await databases.createDatetimeAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
xdefault: '2020-10-15T06:38:00.000+00:00', // (optional)
array: false, // (optional)
);
```
2 changes: 1 addition & 1 deletion docs/examples/databases/get-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Client client = Client()

Databases databases = Databases(client);

AttributeBoolean result = await databases.getAttribute(
dynamic result = await databases.getAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
Expand Down
1 change: 1 addition & 0 deletions docs/examples/databases/update-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ Collection result = await databases.updateCollection(
permissions: [Permission.read(Role.any())], // (optional)
documentSecurity: false, // (optional)
enabled: false, // (optional)
purge: false, // (optional)
);
```
2 changes: 1 addition & 1 deletion docs/examples/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AttributeDatetime result = await databases.updateDatetimeAttribute(
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '',
xdefault: '2020-10-15T06:38:00.000+00:00',
newKey: '', // (optional)
);
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Message result = await messaging.createEmail(
attachments: [], // (optional)
draft: false, // (optional)
html: false, // (optional)
scheduledAt: '', // (optional)
scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional)
);
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Message result = await messaging.createPush(
tag: '<TAG>', // (optional)
badge: 0, // (optional)
draft: false, // (optional)
scheduledAt: '', // (optional)
scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional)
contentAvailable: false, // (optional)
critical: false, // (optional)
priority: enums.MessagePriority.normal, // (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/messaging/create-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Message result = await messaging.createSMS(
users: [], // (optional)
targets: [], // (optional)
draft: false, // (optional)
scheduledAt: '', // (optional)
scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional)
);
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Message result = await messaging.updateEmail(
html: false, // (optional)
cc: [], // (optional)
bcc: [], // (optional)
scheduledAt: '', // (optional)
scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional)
attachments: [], // (optional)
);
```
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Message result = await messaging.updatePush(
tag: '<TAG>', // (optional)
badge: 0, // (optional)
draft: false, // (optional)
scheduledAt: '', // (optional)
scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional)
contentAvailable: false, // (optional)
critical: false, // (optional)
priority: enums.MessagePriority.normal, // (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/messaging/update-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Message result = await messaging.updateSMS(
targets: [], // (optional)
content: '<CONTENT>', // (optional)
draft: false, // (optional)
scheduledAt: '', // (optional)
scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional)
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-android-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformAndroid result = await project.createAndroidPlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
applicationId: '<APPLICATION_ID>',
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-apple-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformApple result = await project.createApplePlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
bundleIdentifier: '<BUNDLE_IDENTIFIER>',
);
```
18 changes: 18 additions & 0 deletions docs/examples/project/create-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';
import 'package:dart_appwrite/enums.dart' as enums;

Client client = 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

Project project = Project(client);

Key result = await project.createKey(
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [enums.Scopes.sessionsWrite],
expire: '2020-10-15T06:38:00.000+00:00', // (optional)
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-linux-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformLinux result = await project.createLinuxPlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
packageName: '<PACKAGE_NAME>',
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-web-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformWeb result = await project.createWebPlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
hostname: 'app.example.com',
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/create-windows-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformWindows result = await project.createWindowsPlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
packageIdentifierName: '<PACKAGE_IDENTIFIER_NAME>',
);
```
14 changes: 14 additions & 0 deletions docs/examples/project/delete-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

await project.deleteKey(
keyId: '<KEY_ID>',
);
```
14 changes: 14 additions & 0 deletions docs/examples/project/delete-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

await project.deletePlatform(
platformId: '<PLATFORM_ID>',
);
```
14 changes: 14 additions & 0 deletions docs/examples/project/get-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

Key result = await project.getKey(
keyId: '<KEY_ID>',
);
```
14 changes: 14 additions & 0 deletions docs/examples/project/get-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

dynamic result = await project.getPlatform(
platformId: '<PLATFORM_ID>',
);
```
15 changes: 15 additions & 0 deletions docs/examples/project/list-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

KeyList result = await project.listKeys(
queries: [], // (optional)
total: false, // (optional)
);
```
15 changes: 15 additions & 0 deletions docs/examples/project/list-platforms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformList result = await project.listPlatforms(
queries: [], // (optional)
total: false, // (optional)
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/update-android-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformAndroid result = await project.updateAndroidPlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
applicationId: '<APPLICATION_ID>',
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/update-apple-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformApple result = await project.updateApplePlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
bundleIdentifier: '<BUNDLE_IDENTIFIER>',
);
```
18 changes: 18 additions & 0 deletions docs/examples/project/update-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';
import 'package:dart_appwrite/enums.dart' as enums;

Client client = 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

Project project = Project(client);

Key result = await project.updateKey(
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [enums.Scopes.sessionsWrite],
expire: '2020-10-15T06:38:00.000+00:00', // (optional)
);
```
14 changes: 14 additions & 0 deletions docs/examples/project/update-labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

Project result = await project.updateLabels(
labels: [],
);
```
16 changes: 16 additions & 0 deletions docs/examples/project/update-linux-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```dart
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = 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

Project project = Project(client);

PlatformLinux result = await project.updateLinuxPlatform(
platformId: '<PLATFORM_ID>',
name: '<NAME>',
packageName: '<PACKAGE_NAME>',
);
```
Loading