Skip to content

Commit 3e4e7cf

Browse files
authored
Merge pull request #29 from appwrite/dev
Add inc/dec
2 parents ac590d9 + 9746902 commit 3e4e7cf

16 files changed

+340
-10
lines changed

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
# Change Log
1+
# Change Log
2+
3+
## 15.1.0
4+
5+
* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service
6+
* Add `gif` support to `ImageFormat` enum
7+
* Add `dart38` and `flutter332` support to runtime models
8+
* Add `encrypt` support to `StringAttribute` model
9+
* Add `sequence` support to `Document` model
10+
* Add `upsertDocument` support to `Databases` service
11+
12+
## 15.0.0
13+
14+
* Add `<REGION>` to doc examples due to the new multi region endpoints
15+
* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc.
16+
* Add doc examples, class and methods for new `Sites` service
17+
* Add doc examples, class and methods for new `Tokens` service
18+
* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType`
19+
* Updates enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329
20+
* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage
21+
* Add `queries` and `search` params to `listMemberships` method
22+
* Removes `search` param from `listExecutions` method

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Deno SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.7.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
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)

docs/examples/databases/create-document.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
22

33
const client = new Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5-
.setSession('') // The user session to authenticate with
6-
.setKey('<YOUR_API_KEY>') // Your secret API key
7-
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
5+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
6+
.setSession(''); // The user session to authenticate with
87

98
const databases = new Databases(client);
109

docs/examples/databases/create-documents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
22

33
const client = new Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
56
.setKey('<YOUR_API_KEY>'); // Your secret API key
67

78
const databases = new Databases(client);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new 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+
const databases = new Databases(client);
9+
10+
const response = await databases.decrementDocumentAttribute(
11+
'<DATABASE_ID>', // databaseId
12+
'<COLLECTION_ID>', // collectionId
13+
'<DOCUMENT_ID>', // documentId
14+
'', // attribute
15+
null, // value (optional)
16+
null // min (optional)
17+
);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new 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+
const databases = new Databases(client);
9+
10+
const response = await databases.incrementDocumentAttribute(
11+
'<DATABASE_ID>', // databaseId
12+
'<COLLECTION_ID>', // collectionId
13+
'<DOCUMENT_ID>', // documentId
14+
'', // attribute
15+
null, // value (optional)
16+
null // max (optional)
17+
);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
2+
3+
const client = new 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+
const databases = new Databases(client);
9+
10+
const response = await databases.upsertDocument(
11+
'<DATABASE_ID>', // databaseId
12+
'<COLLECTION_ID>', // collectionId
13+
'<DOCUMENT_ID>', // documentId
14+
{}, // data
15+
["read("any")"] // permissions (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 @@ const databases = new Databases(client);
1010
const response = await databases.upsertDocuments(
1111
'<DATABASE_ID>', // databaseId
1212
'<COLLECTION_ID>', // collectionId
13-
[] // documents (optional)
13+
[] // documents
1414
);

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export class Client {
1111
endpoint: string = 'https://cloud.appwrite.io/v1';
1212
headers: Payload = {
1313
'content-type': '',
14-
'user-agent' : `AppwriteDenoSDK/15.0.0 (${Deno.build.os}; ${Deno.build.arch})`,
14+
'user-agent' : `AppwriteDenoSDK/15.1.0 (${Deno.build.os}; ${Deno.build.arch})`,
1515
'x-sdk-name': 'Deno',
1616
'x-sdk-platform': 'server',
1717
'x-sdk-language': 'deno',
18-
'x-sdk-version': '15.0.0',
18+
'x-sdk-version': '15.1.0',
1919
'X-Appwrite-Response-Format':'1.7.0',
2020
};
2121

src/enums/build-runtime.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export enum BuildRuntime {
3636
Dart31 = 'dart-3.1',
3737
Dart33 = 'dart-3.3',
3838
Dart35 = 'dart-3.5',
39+
Dart38 = 'dart-3.8',
3940
Dotnet60 = 'dotnet-6.0',
4041
Dotnet70 = 'dotnet-7.0',
4142
Dotnet80 = 'dotnet-8.0',
@@ -62,4 +63,5 @@ export enum BuildRuntime {
6263
Flutter324 = 'flutter-3.24',
6364
Flutter327 = 'flutter-3.27',
6465
Flutter329 = 'flutter-3.29',
66+
Flutter332 = 'flutter-3.32',
6567
}

0 commit comments

Comments
 (0)