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

## 15.1.0

* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service
* Add `gif` support to `ImageFormat` enum
* Add `dart38` and `flutter332` support to runtime models
* Add `encrypt` support to `StringAttribute` model
* Add `sequence` support to `Document` model
* Add `upsertDocument` support to `Databases` service

## 15.0.0

* Add `<REGION>` to doc examples due to the new multi region endpoints
* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc.
* Add doc examples, class and methods for new `Sites` service
* Add doc examples, class and methods for new `Tokens` service
* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType`
* Updates enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329
* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage
* Add `queries` and `search` params to `listMemberships` method
* Removes `search` param from `listExecutions` method
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Appwrite Deno SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.7.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
Expand Down
5 changes: 2 additions & 3 deletions docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";

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

const databases = new Databases(client);

Expand Down
1 change: 1 addition & 0 deletions docs/examples/databases/create-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";

const 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

const databases = new Databases(client);
Expand Down
17 changes: 17 additions & 0 deletions docs/examples/databases/decrement-document-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";

const 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

const databases = new Databases(client);

const response = await databases.decrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // min (optional)
);
17 changes: 17 additions & 0 deletions docs/examples/databases/increment-document-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";

const 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

const databases = new Databases(client);

const response = await databases.incrementDocumentAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
'', // attribute
null, // value (optional)
null // max (optional)
);
16 changes: 16 additions & 0 deletions docs/examples/databases/upsert-document.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with

const databases = new Databases(client);

const response = await databases.upsertDocument(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'<DOCUMENT_ID>', // documentId
{}, // data
["read("any")"] // permissions (optional)
);
2 changes: 1 addition & 1 deletion docs/examples/databases/upsert-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ const databases = new Databases(client);
const response = await databases.upsertDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // documents (optional)
[] // documents
);
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export class Client {
endpoint: string = 'https://cloud.appwrite.io/v1';
headers: Payload = {
'content-type': '',
'user-agent' : `AppwriteDenoSDK/15.0.0 (${Deno.build.os}; ${Deno.build.arch})`,
'user-agent' : `AppwriteDenoSDK/15.1.0 (${Deno.build.os}; ${Deno.build.arch})`,
'x-sdk-name': 'Deno',
'x-sdk-platform': 'server',
'x-sdk-language': 'deno',
'x-sdk-version': '15.0.0',
'x-sdk-version': '15.1.0',
'X-Appwrite-Response-Format':'1.7.0',
};

Expand Down
2 changes: 2 additions & 0 deletions src/enums/build-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export enum BuildRuntime {
Dart31 = 'dart-3.1',
Dart33 = 'dart-3.3',
Dart35 = 'dart-3.5',
Dart38 = 'dart-3.8',
Dotnet60 = 'dotnet-6.0',
Dotnet70 = 'dotnet-7.0',
Dotnet80 = 'dotnet-8.0',
Expand All @@ -62,4 +63,5 @@ export enum BuildRuntime {
Flutter324 = 'flutter-3.24',
Flutter327 = 'flutter-3.27',
Flutter329 = 'flutter-3.29',
Flutter332 = 'flutter-3.32',
}
1 change: 1 addition & 0 deletions src/enums/image-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export enum ImageFormat {
Webp = 'webp',
Heic = 'heic',
Avif = 'avif',
Gif = 'gif',
}
2 changes: 2 additions & 0 deletions src/enums/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export enum Runtime {
Dart31 = 'dart-3.1',
Dart33 = 'dart-3.3',
Dart35 = 'dart-3.5',
Dart38 = 'dart-3.8',
Dotnet60 = 'dotnet-6.0',
Dotnet70 = 'dotnet-7.0',
Dotnet80 = 'dotnet-8.0',
Expand All @@ -62,4 +63,5 @@ export enum Runtime {
Flutter324 = 'flutter-3.24',
Flutter327 = 'flutter-3.27',
Flutter329 = 'flutter-3.29',
Flutter332 = 'flutter-3.32',
}
8 changes: 8 additions & 0 deletions src/models.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@ export namespace Models {
* Default value for attribute when not provided. Cannot be set when attribute is required.
*/
xdefault?: string;
/**
* Defines whether this attribute is encrypted or not.
*/
encrypt?: boolean;
}
/**
* AttributeInteger
Expand Down Expand Up @@ -1021,6 +1025,10 @@ export namespace Models {
* Document ID.
*/
$id: string;
/**
* Document automatically incrementing ID.
*/
$sequence: number;
/**
* Collection ID.
*/
Expand Down
Loading