Skip to content

Commit e15eaf8

Browse files
committed
Add inc/dec
1 parent 845ca67 commit e15eaf8

File tree

160 files changed

+12283
-13087
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+12283
-13087
lines changed

CHANGELOG.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 16.0.0
44

5-
* Add `<REGION>` to doc examples due to the new multi region endpoints
5+
* Add `<REGION>` to doc examples due to the new multi region endpoints
66
* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc.
77
* Add doc examples, class and methods for new `Sites` service
88
* Add doc examples, class and methods for new `Tokens` service
@@ -15,13 +15,13 @@
1515
## 14.0.0
1616

1717
* Breaking changes:
18-
* Changed the typing of `AppwriteException`&#039;s response parameter from a `dynamic` object to an optional string (`?String`).
18+
* Changed the typing of `AppwriteException`'s response parameter from a `dynamic` object to an optional string (`?String`).
1919

2020
## 13.0.0
2121

2222
* Fixed realtime pong response.
2323
* Fixed issues with `chunkedUpload` method.
24-
* Fixed type mismatch bug where `List&lt;dynamic&gt;` was incorrectly causing runtime type errors.
24+
* Fixed type mismatch bug where `List<dynamic>` was incorrectly causing runtime type errors.
2525
* Updated return type of `updateMfaChallenge()` from raw data to properly typed `models.Session` object.
2626

2727
## 12.0.0
@@ -151,7 +151,7 @@ You can find the new syntax for breaking changes in the [Appwrite API references
151151
* The `number` argument in phone endpoints have been renamed to `phone`
152152
* List endpoints no longer support `limit`, `offset`, `cursor`, `cursorDirection`, `orderAttributes`, `orderTypes` as they have been moved to the `queries` array
153153
* `read` and `write` permission have been deprecated and they are now included in the `permissions` array
154-
* Parameter `permission` for collections and buckets are now renamed to `documentSecurity` &amp; `fileSecurity` respectively
154+
* Parameter `permission` for collections and buckets are now renamed to `documentSecurity` & `fileSecurity` respectively
155155
* Renamed methods of the Query helper
156156
1. `lesser` renamed to `lessThan`
157157
2. `lesserEqual` renamed to `lessThanEqual`
@@ -167,8 +167,8 @@ You can find the new syntax for breaking changes in the [Appwrite API references
167167

168168
## 6.0.0
169169
* Support for Appwrite 0.15
170-
* **BREAKING** `Database` -&gt; `Databases`
171-
* **BREAKING** `account.createSession()` -&gt; `account.createEmailSession()`
170+
* **BREAKING** `Database` -> `Databases`
171+
* **BREAKING** `account.createSession()` -> `account.createEmailSession()`
172172
* **BREAKING** `dateCreated` attribute removed from `Team`, `Execution`, `File` models
173173
* **BREAKING** `dateCreated` and `dateUpdated` attribute removed from `Func`, `Deployment`, `Bucket` models
174174
* **BREAKING** Realtime channels
@@ -182,7 +182,7 @@ You can find the new syntax for breaking changes in the [Appwrite API references
182182

183183
## 5.0.0
184184
* Support for Appwrite 0.14
185-
* **BREAKING** `account.delete()` -&gt; `account.updateStatus()`
185+
* **BREAKING** `account.delete()` -> `account.updateStatus()`
186186
* **BREAKING** Execution model `stdout` renamed to `response`
187187
* **BREAKING** Membership model `name` renamed to `userName` and `email` renamed to `userEmail`
188188
* Added `teamName` to Membership model
@@ -200,7 +200,7 @@ You can find the new syntax for breaking changes in the [Appwrite API references
200200
* **BREAKING** **Tags** have been renamed to **Deployments**
201201
* **BREAKING** `createFile` function expects Bucket ID as the first parameter
202202
* **BREAKING** `createDeployment` and `createFile` functions expect an instance **InputFile** rather than the instance of **MultipartFile**
203-
* **BREAKING** `list&lt;Entity&gt;` endpoints now contain a `total` attribute instead of `sum`
203+
* **BREAKING** `list<Entity>` endpoints now contain a `total` attribute instead of `sum`
204204
* `onProgress()` callback function for endpoints supporting file uploads
205205
* Support for synchronous function executions
206206
* Bug fixes and Improvements
@@ -237,7 +237,7 @@ You can find the new syntax for breaking changes in the [Appwrite API references
237237

238238
## 0.7.0
239239
- Support for Appwrite 0.9
240-
- Breaking - removed order type enum, now you should pass string &#039;ASC&#039; or &#039;DESC&#039;
240+
- Breaking - removed order type enum, now you should pass string 'ASC' or 'DESC'
241241
- Breaking - changed param name from `env` to `runtime` in the **Functions** API
242242
- Image Crop Gravity support in image preview service
243243
- New endpoint in Account getSession to get session by ID
@@ -258,7 +258,7 @@ You can find the new syntax for breaking changes in the [Appwrite API references
258258
- Upgraded all underlying dependencies to null safe version
259259
- BREAKING Renamed users.deleteUser to users.delete
260260
- BREAKING Renamed parameter inviteId to membershipId on teams.updateMembershipStatus, teams.deleteMembership
261-
- JWT Support client.setJWT(&#039;JWT_GENERATED_IN_CLIENT&#039;)
261+
- JWT Support client.setJWT('JWT_GENERATED_IN_CLIENT')
262262
- [Update membership roles](https://appwrite.io/docs/references/cloud/server-dart/teams?sdk=dart#updateMembershipRoles)
263263
- New awesome image preview features, supports borderRadius, borderColor, borderWidth
264264

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^16.0.0
26+
dart_appwrite: ^16.1.0
2727
```
2828
2929
You can install packages from the command line:

docs/examples/databases/create-document.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart';
22

33
Client client = Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setAdmin('') //
56
.setSession('') // The user session to authenticate with
67
.setKey('<YOUR_API_KEY>') // Your secret API key
78
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
Client client = Client()
4+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
6+
.setKey('<YOUR_API_KEY>'); // Your secret API key
7+
8+
Databases databases = Databases(client);
9+
10+
Document result = await databases.decrementDocumentAttribute(
11+
databaseId: '<DATABASE_ID>',
12+
collectionId: '<COLLECTION_ID>',
13+
documentId: '<DOCUMENT_ID>',
14+
attribute: '',
15+
value: 0, // (optional)
16+
min: 0, // (optional)
17+
);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
Client client = Client()
4+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
6+
.setKey('<YOUR_API_KEY>'); // Your secret API key
7+
8+
Databases databases = Databases(client);
9+
10+
Document result = await databases.incrementDocumentAttribute(
11+
databaseId: '<DATABASE_ID>',
12+
collectionId: '<COLLECTION_ID>',
13+
documentId: '<DOCUMENT_ID>',
14+
attribute: '',
15+
value: 0, // (optional)
16+
max: 0, // (optional)
17+
);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
Client client = Client()
4+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
6+
.setSession(''); // The user session to authenticate with
7+
8+
Databases databases = Databases(client);
9+
10+
Document result = await databases.upsertDocument(
11+
databaseId: '<DATABASE_ID>',
12+
collectionId: '<COLLECTION_ID>',
13+
documentId: '<DOCUMENT_ID>',
14+
data: {},
15+
permissions: ["read("any")"], // (optional)
16+
);

docs/examples/databases/upsert-documents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ Databases databases = Databases(client);
1010
DocumentList result = await databases.upsertDocuments(
1111
databaseId: '<DATABASE_ID>',
1212
collectionId: '<COLLECTION_ID>',
13-
documents: [], // (optional)
13+
documents: [],
1414
);

lib/client_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/client_browser.dart';
1+
export 'src/client_browser.dart';

lib/client_io.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/client_io.dart';
1+
export 'src/client_io.dart';

lib/dart_appwrite.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// Appwrite Dart SDK
22
///
3-
/// This SDK is compatible with Appwrite server version 1.7.x.
3+
/// This SDK is compatible with Appwrite server version 1.7.x.
44
/// For older versions, please check
55
/// [previous releases](https://github.com/appwrite/sdk-for-dart/releases).
66
library dart_appwrite;

0 commit comments

Comments
 (0)